Minor code clean up

This commit is contained in:
chubtub 2021-08-18 09:15:59 -04:00
parent f54e1a15d0
commit c76a8a074e

View File

@ -1346,7 +1346,6 @@ public final class SupplyChainCredentialValidator implements CredentialValidator
} }
final String intCAError = "Intermediate signing cert found, check for CA cert"; final String intCAError = "Intermediate signing cert found, check for CA cert";
String foundRootOfCertChain = ""; String foundRootOfCertChain = "";
X509AttributeCertificateHolder startOfChain = cert;
X509Certificate nextInChain = null; X509Certificate nextInChain = null;
do { do {
@ -1358,9 +1357,8 @@ public final class SupplyChainCredentialValidator implements CredentialValidator
signatureMatchesPublicKey = signatureMatchesPublicKey(nextInChain, signatureMatchesPublicKey = signatureMatchesPublicKey(nextInChain,
trustedCert); trustedCert);
} else { } else {
issuerMatchesSubject = issuerMatchesSubjectDN(startOfChain, trustedCert); issuerMatchesSubject = issuerMatchesSubjectDN(cert, trustedCert);
signatureMatchesPublicKey = signatureMatchesPublicKey(startOfChain, signatureMatchesPublicKey = signatureMatchesPublicKey(cert, trustedCert);
trustedCert);
} }
if (issuerMatchesSubject && signatureMatchesPublicKey) { if (issuerMatchesSubject && signatureMatchesPublicKey) {