提交 fb8a8b40 编写于 作者: J Jesse Glick

Merge pull request #1462 from cyrille-leclerc/add-verbose-logs

Better debug messages in JSONSignatureValidator
......@@ -69,6 +69,7 @@ public class JSONSignatureValidator {
} catch (CertificateNotYetValidException e) {
warning = FormValidation.warning(e,String.format("Certificate %s is not yet valid in %s",cert.toString(),name));
}
LOGGER.log(Level.FINE, "Add certificate found in json doc: \r\n\tsubjectDN: {0}\r\n\tissuer: {1}", new Object[]{c.getSubjectDN(), c.getIssuerDN()});
certs.add(c);
}
......@@ -154,7 +155,10 @@ public class JSONSignatureValidator {
in.close();
}
try {
anchors.add(new TrustAnchor((X509Certificate) certificate, null));
TrustAnchor certificateAuthority = new TrustAnchor((X509Certificate) certificate, null);
LOGGER.log(Level.FINE, "Add Certificate Authority {0}: {1}",
new Object[]{cert, (certificateAuthority.getTrustedCert() == null ? null : certificateAuthority.getTrustedCert().getSubjectDN())});
anchors.add(certificateAuthority);
} catch (IllegalArgumentException e) {
LOGGER.log(Level.WARNING,
String.format("The name constraints in the certificate resource %s could not be "
......@@ -183,7 +187,10 @@ public class JSONSignatureValidator {
in.close();
}
try {
anchors.add(new TrustAnchor((X509Certificate) certificate, null));
TrustAnchor certificateAuthority = new TrustAnchor((X509Certificate) certificate, null);
LOGGER.log(Level.FINE, "Add Certificate Authority {0}: {1}",
new Object[]{cert, (certificateAuthority.getTrustedCert() == null ? null : certificateAuthority.getTrustedCert().getSubjectDN())});
anchors.add(certificateAuthority);
} catch (IllegalArgumentException e) {
LOGGER.log(Level.WARNING,
String.format("The name constraints in the certificate file %s could not be "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册