From c76a8a074eee6e62f88449f04a8a4e2638b46ef6 Mon Sep 17 00:00:00 2001 From: chubtub <43381989+chubtub@users.noreply.github.com> Date: Wed, 18 Aug 2021 09:15:59 -0400 Subject: [PATCH] Minor code clean up --- .../hirs/validation/SupplyChainCredentialValidator.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/HIRS_Utils/src/main/java/hirs/validation/SupplyChainCredentialValidator.java b/HIRS_Utils/src/main/java/hirs/validation/SupplyChainCredentialValidator.java index 3c85b88d..e4c3c5ed 100644 --- a/HIRS_Utils/src/main/java/hirs/validation/SupplyChainCredentialValidator.java +++ b/HIRS_Utils/src/main/java/hirs/validation/SupplyChainCredentialValidator.java @@ -1346,7 +1346,6 @@ public final class SupplyChainCredentialValidator implements CredentialValidator } final String intCAError = "Intermediate signing cert found, check for CA cert"; String foundRootOfCertChain = ""; - X509AttributeCertificateHolder startOfChain = cert; X509Certificate nextInChain = null; do { @@ -1358,9 +1357,8 @@ public final class SupplyChainCredentialValidator implements CredentialValidator signatureMatchesPublicKey = signatureMatchesPublicKey(nextInChain, trustedCert); } else { - issuerMatchesSubject = issuerMatchesSubjectDN(startOfChain, trustedCert); - signatureMatchesPublicKey = signatureMatchesPublicKey(startOfChain, - trustedCert); + issuerMatchesSubject = issuerMatchesSubjectDN(cert, trustedCert); + signatureMatchesPublicKey = signatureMatchesPublicKey(cert, trustedCert); } if (issuerMatchesSubject && signatureMatchesPublicKey) {