diff --git a/src/main/java/eu/europa/ec/dgc/gateway/connector/DgcGatewayConnectorUtils.java b/src/main/java/eu/europa/ec/dgc/gateway/connector/DgcGatewayConnectorUtils.java index f72a93d..f709433 100644 --- a/src/main/java/eu/europa/ec/dgc/gateway/connector/DgcGatewayConnectorUtils.java +++ b/src/main/java/eu/europa/ec/dgc/gateway/connector/DgcGatewayConnectorUtils.java @@ -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) { @@ -141,6 +144,8 @@ public boolean trustListItemSignedByCa(TrustListItemDto certificate, Map caList = caMap.get(dcs.getIssuer().toString()); @@ -283,8 +288,7 @@ protected Map 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; diff --git a/src/test/java/eu/europa/ec/dgc/testdata/TrustedIssuerTestHelper.java b/src/test/java/eu/europa/ec/dgc/testdata/TrustedIssuerTestHelper.java index 1b1ff39..000b505 100644 --- a/src/test/java/eu/europa/ec/dgc/testdata/TrustedIssuerTestHelper.java +++ b/src/test/java/eu/europa/ec/dgc/testdata/TrustedIssuerTestHelper.java @@ -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() + ";";