diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java index 66cdb509..68975ea9 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/FirmwareScvValidator.java @@ -103,11 +103,17 @@ public class FirmwareScvValidator extends SupplyChainCredentialValidator { CertificateAuthorityCredential signingCert = null; for (CertificateAuthorityCredential cert : allCerts) { signingCert = cert; - KeyStore keyStore = ValidationService.getCaChain(signingCert, - caCredentialRepository); + KeyStore keyStore = null; Set set = ValidationService.getCaChainRec(signingCert, Collections.emptySet(), caCredentialRepository); + try { + keyStore = ValidationService.caCertSetToKeystore(set); + } catch (Exception e) { + log.error("Error building CA chain for " + signingCert.getSubjectKeyIdentifier() + ": " + + e.getMessage()); + } + ArrayList certs = new ArrayList<>(set.size()); for (CertificateAuthorityCredential cac : set) { try {