From 6484fc0c2a0b5a675d93cc015f3ac585593052cd Mon Sep 17 00:00:00 2001 From: Felix Dittrich Date: Thu, 3 Nov 2022 14:26:57 +0100 Subject: [PATCH] add BC Security Provider to support EC explicit Keys --- .../ec/dgc/gateway/connector/DgcGatewayConnectorUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 132bf71..7da1edf 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 @@ -106,7 +106,9 @@ void init() throws KeyStoreException, CertificateEncodingException, IOException public boolean trustListItemSignedByCa(TrustListItemDto certificate, X509CertificateHolder ca) { ContentVerifierProvider verifier; try { - verifier = new JcaContentVerifierProviderBuilder().build(ca); + verifier = new JcaContentVerifierProviderBuilder() + .setProvider(new BouncyCastleProvider()) + .build(ca); } catch (OperatorCreationException | CertificateException e) { log.error("Failed to instantiate JcaContentVerifierProvider from cert. KID: {}, Country: {}", certificate.getKid(), certificate.getCountry());