7028422: regression: SKID miss-matching
Summary: Do not override the previous setting for initial selection.
Reviewed-by: mullan
--- 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;
}