Skip to content

Commit

Permalink
Fix Checkstyle Findings
Browse files Browse the repository at this point in the history
  • Loading branch information
f11h committed Sep 15, 2023
1 parent 07b4914 commit 7f8b9e3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ public static class EcPublicKeyJwk extends PublicKeyJwk {
@JsonProperty("y")
private String valueY;

/**
* Instantiate EC PublicKey JWK Class.
*
* @param ecPublicKey EC Public Key that should be wrapped.
* @param base64EncodedCertificates List of Base64 encoded Certificates assigned to provided Public Key.
* They will be added within x5c property of JWK.
*/
public EcPublicKeyJwk(ECPublicKey ecPublicKey, List<String> base64EncodedCertificates) {
super("EC", base64EncodedCertificates);
valueX = Base64.getEncoder().encodeToString(ecPublicKey.getW().getAffineX().toByteArray());
Expand All @@ -97,6 +104,13 @@ public static class RsaPublicKeyJwk extends PublicKeyJwk {
@JsonProperty("n")
private String valueN;

/**
* Instantiate RSA PublicKey JWK Class.
*
* @param rsaPublicKey RSA Public Key that should be wrapped.
* @param base64EncodedCertificates List of Base64 encoded Certificates assigned to provided Public Key.
* They will be added within x5c property of JWK.
*/
public RsaPublicKeyJwk(RSAPublicKey rsaPublicKey, List<String> base64EncodedCertificates) {
super("RSA", base64EncodedCertificates);
valueN = Base64.getEncoder().encodeToString(rsaPublicKey.getModulus().toByteArray());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ private String generateTrustList() throws Exception {

return jsonLdObject.toJson();
}

private void addTrustListEntry(DidTrustListDto trustList,
TrustedCertificateTrustList cert,
DidTrustListEntryDto.PublicKeyJwk publicKeyJwk) throws CertificateEncodingException {
Expand Down

0 comments on commit 7f8b9e3

Please sign in to comment.