Skip to content

Commit

Permalink
Adjust fields for signature check
Browse files Browse the repository at this point in the history
  • Loading branch information
slaurenz committed Mar 25, 2022
1 parent bc971a6 commit bbfc64f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ public boolean trustListItemSignedByCa(TrustListItemDto certificate, X509Certifi
log.error("Could not parse certificate. KID: {}, Country: {}",
certificate.getKid(), certificate.getCountry());
return false;
} catch (NullPointerException e) {
return false;
}


try {
return dcs.isSignatureValid(verifier);
} catch (CertException | RuntimeOperatorException e) {
Expand All @@ -141,6 +144,8 @@ public boolean trustListItemSignedByCa(TrustListItemDto certificate, Map<String,
log.error("Could not parse certificate. KID: {}, Country: {}",
certificate.getKid(), certificate.getCountry());
return false;
} catch (NullPointerException e) {
return false;
}

List<X509CertificateHolder> caList = caMap.get(dcs.getIssuer().toString());
Expand Down Expand Up @@ -283,8 +288,7 @@ protected Map<String, String> convertQueryParams(
}

private String getHashData(TrustedIssuerDto trustedIssuerDto) {
return trustedIssuerDto.getUuid() + HASH_SEPARATOR
+ trustedIssuerDto.getCountry() + HASH_SEPARATOR
return trustedIssuerDto.getCountry() + HASH_SEPARATOR
+ trustedIssuerDto.getName() + HASH_SEPARATOR
+ trustedIssuerDto.getUrl() + HASH_SEPARATOR
+ trustedIssuerDto.getType().name() + HASH_SEPARATOR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public TrustedIssuerDto createTrustedIssuer(final String country) throws Excepti
}

private String getHashData(TrustedIssuerDto entity) {
return entity.getUuid()+ ";"
+ entity.getCountry() + ";"
return entity.getCountry() + ";"
+ entity.getName() + ";"
+ entity.getUrl() + ";"
+ entity.getType().name() + ";";
Expand Down

0 comments on commit bbfc64f

Please sign in to comment.