From c6e7907fad8a3767b8ca6651046bd72dfc3efd3a Mon Sep 17 00:00:00 2001 From: coffeys Date: Fri, 21 Jun 2019 08:07:18 +0000 Subject: [PATCH] 8133489: Better messaging for PKIX path validation matching Reviewed-by: xuelei, phh, andrew --- .../classes/java/security/cert/X509CertSelector.java | 7 +++++-- .../cert/CertPathBuilder/selfIssued/KeyUsageMatters.java | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/share/classes/java/security/cert/X509CertSelector.java b/src/share/classes/java/security/cert/X509CertSelector.java index 4a1ff7ef5..0fe97a602 100644 --- a/src/share/classes/java/security/cert/X509CertSelector.java +++ b/src/share/classes/java/security/cert/X509CertSelector.java @@ -2115,8 +2115,11 @@ public class X509CertSelector implements CertSelector { 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; } diff --git a/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java b/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java index 75bf2ec5a..79dce7e44 100644 --- a/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java +++ b/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java @@ -29,12 +29,12 @@ /** * @test - * @bug 6852744 + * @bug 6852744 8133489 * @summary PIT b61: PKI test suite fails because self signed certificates * are being rejected - * @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 */ -- GitLab