8133489: Better messaging for PKIX path validation matching
authorcoffeys
Fri, 21 Jun 2019 08:07:18 +0000
changeset 55459 00f29fe98900
parent 55458 81ac9262e63b
child 55460 17ba7ce18564
child 57418 fd4ec73925c3
8133489: Better messaging for PKIX path validation matching Reviewed-by: xuelei
src/java.base/share/classes/java/security/cert/X509CertSelector.java
test/jdk/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java
--- a/src/java.base/share/classes/java/security/cert/X509CertSelector.java	Fri Jun 21 04:16:18 2019 +0200
+++ b/src/java.base/share/classes/java/security/cert/X509CertSelector.java	Fri Jun 21 08:07:18 2019 +0000
@@ -2115,8 +2115,11 @@
             if (certSubjectKeyID == null ||
                     !Arrays.equals(subjectKeyID, certSubjectKeyID)) {
                 if (debug != null) {
-                    debug.println("X509CertSelector.match: "
-                        + "subject key IDs don't match");
+                    debug.println("X509CertSelector.match: subject key IDs " +
+                        "don't match\nX509CertSelector.match: subjectKeyID: " +
+                        Arrays.toString(subjectKeyID) +
+                        "\nX509CertSelector.match: certSubjectKeyID: " +
+                        Arrays.toString(certSubjectKeyID));
                 }
                 return false;
             }
--- a/test/jdk/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java	Fri Jun 21 04:16:18 2019 +0200
+++ b/test/jdk/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java	Fri Jun 21 08:07:18 2019 +0000
@@ -29,13 +29,13 @@
 
 /**
  * @test
- * @bug 6852744
+ * @bug 6852744 8133489
  * @summary PIT b61: PKI test suite fails because self signed certificates
  *          are being rejected
  * @modules java.base/sun.security.util
- * @run main/othervm KeyUsageMatters subca
- * @run main/othervm KeyUsageMatters subci
- * @run main/othervm KeyUsageMatters alice
+ * @run main/othervm -Djava.security.debug=certpath KeyUsageMatters subca
+ * @run main/othervm -Djava.security.debug=certpath KeyUsageMatters subci
+ * @run main/othervm -Djava.security.debug=certpath KeyUsageMatters alice
  * @author Xuelei Fan
  */