From 1d6e7e379fdb7bd04a0f8e2be365aac8f258ff60 Mon Sep 17 00:00:00 2001 From: Felix Dittrich Date: Fri, 25 Feb 2022 08:53:18 +0100 Subject: [PATCH] Fix missing domain for federated certificates --- .../europa/ec/dgc/gateway/service/SignerInformationService.java | 2 ++ .../eu/europa/ec/dgc/gateway/service/TrustedPartyService.java | 2 ++ .../downloaderimplementations/LegacyDgcgDownloader.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/main/java/eu/europa/ec/dgc/gateway/service/SignerInformationService.java b/src/main/java/eu/europa/ec/dgc/gateway/service/SignerInformationService.java index 778e52d9..13a6388a 100644 --- a/src/main/java/eu/europa/ec/dgc/gateway/service/SignerInformationService.java +++ b/src/main/java/eu/europa/ec/dgc/gateway/service/SignerInformationService.java @@ -251,6 +251,7 @@ public SignerInformationEntity addFederatedSignerCertificate( String signature, String countryCode, String kid, + String domain, FederationGatewayEntity sourceGateway ) throws SignerCertCheckException { @@ -274,6 +275,7 @@ public SignerInformationEntity addFederatedSignerCertificate( newSignerInformation.setThumbprint(certificateUtils.getCertThumbprint(certificate)); newSignerInformation.setCertificateType(SignerInformationEntity.CertificateType.DSC); newSignerInformation.setSignature(signature); + newSignerInformation.setDomain(domain == null ? "DCC" : domain); log.info("Saving Federated SignerInformation Entity"); diff --git a/src/main/java/eu/europa/ec/dgc/gateway/service/TrustedPartyService.java b/src/main/java/eu/europa/ec/dgc/gateway/service/TrustedPartyService.java index b395a6ff..0ba06ae0 100644 --- a/src/main/java/eu/europa/ec/dgc/gateway/service/TrustedPartyService.java +++ b/src/main/java/eu/europa/ec/dgc/gateway/service/TrustedPartyService.java @@ -265,6 +265,7 @@ public TrustedPartyEntity addFederatedTrustedParty( String signature, String countryCode, String kid, + String domain, TrustedPartyEntity.CertificateType type, FederationGatewayEntity sourceGateway ) throws IOException { @@ -280,6 +281,7 @@ public TrustedPartyEntity addFederatedTrustedParty( newTrustedPartyEntity.setThumbprint(certificateUtils.getCertThumbprint(certificate)); newTrustedPartyEntity.setCertificateType(type); newTrustedPartyEntity.setSignature(signature); + newTrustedPartyEntity.setDomain(domain == null ? "DCC" : domain); log.info("Saving Federated SignerInformation Entity"); diff --git a/src/main/java/eu/europa/ec/dgc/gateway/service/federation/downloaderimplementations/LegacyDgcgDownloader.java b/src/main/java/eu/europa/ec/dgc/gateway/service/federation/downloaderimplementations/LegacyDgcgDownloader.java index 966e7e17..e761e43f 100644 --- a/src/main/java/eu/europa/ec/dgc/gateway/service/federation/downloaderimplementations/LegacyDgcgDownloader.java +++ b/src/main/java/eu/europa/ec/dgc/gateway/service/federation/downloaderimplementations/LegacyDgcgDownloader.java @@ -159,6 +159,7 @@ private void persistTrustedParty( trustListItem.getSignature(), trustListItem.getCountry(), null, + null, type, gateway ); @@ -183,6 +184,7 @@ private void persistTrustList(FederationGatewayEntity gateway, List