7028422: regression: SKID miss-matching
authorxuelei
Thu, 17 Mar 2011 08:55:41 -0700
changeset 8798 088871daae86
parent 8797 e8507464a69d
child 8799 99032bb1a2b9
child 8800 e658ae923d53
7028422: regression: SKID miss-matching Summary: Do not override the previous setting for initial selection. Reviewed-by: mullan
jdk/src/share/classes/sun/security/provider/certpath/AdaptableX509CertSelector.java
--- a/jdk/src/share/classes/sun/security/provider/certpath/AdaptableX509CertSelector.java	Thu Mar 17 11:37:06 2011 -0400
+++ b/jdk/src/share/classes/sun/security/provider/certpath/AdaptableX509CertSelector.java	Thu Mar 17 08:55:41 2011 -0700
@@ -103,8 +103,8 @@
         if (akidext != null) {
             KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID);
             if (akid != null) {
-                // Do not override the previous setting
-                if (getSubjectKeyIdentifier() == null) {
+                // Do not override the previous setting for initial selection.
+                if (isSKIDSensitive || getSubjectKeyIdentifier() == null) {
                     DerOutputStream derout = new DerOutputStream();
                     derout.putOctetString(akid.getIdentifier());
                     super.setSubjectKeyIdentifier(derout.toByteArray());
@@ -116,8 +116,8 @@
             SerialNumber asn =
                 (SerialNumber)akidext.get(akidext.SERIAL_NUMBER);
             if (asn != null) {
-                // Do not override the previous setting
-                if (getSerialNumber() == null) {
+                // Do not override the previous setting for initial selection.
+                if (isSNSensitive || getSerialNumber() == null) {
                     super.setSerialNumber(asn.getNumber());
                     isSNSensitive = true;
                 }