Skip to content

Commit

Permalink
Cherry-pick: Adding thumbprints validation logging improvements (vmwa…
Browse files Browse the repository at this point in the history
  • Loading branch information
lmalvins authored May 19, 2018
1 parent 61a4765 commit d25cb4f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ public static String getThumbprint(java.security.cert.X509Certificate cert) thro
public static void checkThumbprint(String thumbprint) throws CertificateException {
synchronized(ThumbprintTrustManager.class) {
if (_thumbprints.contains(thumbprint)) {
_logger.info("expected one of this thumbprints: " +_thumbprints + "\n" + "actual thumbprint: " + "["+thumbprint+"]"
+ "...thumbprints matching ok!");
return;
}

_logger.error("Server certificate chain is not trusted " + "and thumbprint doesn't match");
_logger.error("Server certificate chain is not trusted " + "and thumbprint doesn't match\n" + "expected one " + "of this "
+ _thumbprints + "\n" + "actual: " + "["+ thumbprint +"]" + "...matching failed!!");
throw new CertificateException("Server certificate chain is not trusted " + "and thumbprint doesn't match");
}
}
Expand Down

0 comments on commit d25cb4f

Please sign in to comment.