changeset 3769:320bdab4cb2a

7028422: regression: SKID miss-matching Summary: Do not override the previous setting for initial selection. Reviewed-by: mullan
author xuelei
date Thu, 17 Mar 2011 08:55:41 -0700
parents df9991dc1f0d
children 3eb51bf7e859 a8569f14121d
files src/share/classes/sun/security/provider/certpath/AdaptableX509CertSelector.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/provider/certpath/AdaptableX509CertSelector.java	Thu Mar 17 11:37:06 2011 -0400
+++ b/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;
                 }