Skip to content

Commit

Permalink
Merge pull request #30 from WorldHealthOrganization/fix/missing-domai…
Browse files Browse the repository at this point in the history
…n-federation

Fix: Missing domain for federated certificates
  • Loading branch information
f11h authored Feb 25, 2022
2 parents 7700f18 + 1d6e7e3 commit 1166592
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ public SignerInformationEntity addFederatedSignerCertificate(
String signature,
String countryCode,
String kid,
String domain,
FederationGatewayEntity sourceGateway
) throws SignerCertCheckException {

Expand All @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public TrustedPartyEntity addFederatedTrustedParty(
String signature,
String countryCode,
String kid,
String domain,
TrustedPartyEntity.CertificateType type,
FederationGatewayEntity sourceGateway
) throws IOException {
Expand All @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private void persistTrustedParty(
trustListItem.getSignature(),
trustListItem.getCountry(),
null,
null,
type,
gateway
);
Expand All @@ -183,6 +184,7 @@ private void persistTrustList(FederationGatewayEntity gateway, List<TrustListIte
trustListItem.getSignature(),
trustListItem.getCountry(),
null,
null,
gateway
);
} catch (SignerInformationService.SignerCertCheckException e) {
Expand Down

0 comments on commit 1166592

Please sign in to comment.