From 26e5099aa53374ae6b10dfdedf1fc20368bb7379 Mon Sep 17 00:00:00 2001 From: iadgovuser29 <33426478+iadgovuser29@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:23:24 -0400 Subject: [PATCH] Trying another method --- .../persist/validation/FirmwareScvValidator.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 {