Merge branch 'issue-381' of github.com:nsacyber/HIRS into issue-381

This commit is contained in:
chubtub 2021-11-17 09:55:21 -05:00
commit 23a086c925
2 changed files with 7 additions and 3 deletions

View File

@ -210,7 +210,8 @@ public class ReferenceManifestValidator {
String calculatedHash = getHashValue(input, SHA256);
supportRimValid = calculatedHash.equals(expected);
if (!supportRimValid) {
LOGGER.info("Unmatched support RIM hash! Expected: " + expected + ", actual: " + calculatedHash);
LOGGER.info("Unmatched support RIM hash! Expected: " + expected
+ ", actual: " + calculatedHash);
}
}

View File

@ -1432,7 +1432,7 @@ public final class SupplyChainCredentialValidator implements CredentialValidator
}
} while (foundRootOfCertChain.equals(intCAError));
LOGGER.error(foundRootOfCertChain);
LOGGER.warn(foundRootOfCertChain);
return foundRootOfCertChain;
}
@ -1638,7 +1638,8 @@ public final class SupplyChainCredentialValidator implements CredentialValidator
} catch (NoSuchProviderException e) {
LOGGER.warn("Incorrect provider for cert signature validation");
} catch (SignatureException e) {
LOGGER.warn("Exception thrown while verifying certificate", e);
LOGGER.warn(String.format("%s.verify(%s)", cert.getSubjectDN(),
signingCert.getSubjectDN()));
}
return false;
@ -1685,6 +1686,8 @@ public final class SupplyChainCredentialValidator implements CredentialValidator
return cert.isSignatureValid(contentVerifierProvider);
} catch (OperatorCreationException | CertException e) {
LOGGER.error("Exception thrown while verifying certificate", e);
LOGGER.error(String.format("%s.isSignatureValid(%s)", cert.getSerialNumber(),
signingKey.getFormat()));
return false;
}
}