Skip to content

Commit

Permalink
- Adding thumbprints validation logging improvements (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmalvins authored and jak-atx committed May 3, 2018
1 parent 1469599 commit da43a71
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 da43a71

Please sign in to comment.