Skip to content

Commit

Permalink
Fixed spurrious eror message
Browse files Browse the repository at this point in the history
  • Loading branch information
bob-fontana committed Feb 8, 2021
1 parent 08f601e commit 7ddfaa8
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,16 @@ void PKIX_Test_6(String oid, String containersAndPolicyOids, TestReporter report
s_logger.debug(validator.toString());
// Validate cert to trust anchor in default keystore
valid = validator.isValid(eeCert, allowedPolicies[1], null);
s_logger.debug(validator.toString());
if (validator.getCertPath() != null) {
validator.dumpCertPath(true);
if (valid == true) {
s_logger.debug("Certificate is valid");
s_logger.debug(validator.toString());
if (validator.getCertPath() != null) {
validator.dumpCertPath(true);
} else {
failMsg = "Certificate is invalid";
s_logger.error(failMsg);
}
}
failMsg = "Certificate is invalid";
s_logger.error(failMsg);
} catch (Exception e) {
failMsg = e.getMessage();
s_logger.error(failMsg);
Expand Down

0 comments on commit 7ddfaa8

Please sign in to comment.