changeset 6436:c6ea84a629db

8006946: PKCS12 test failure due to incorrect alias name Reviewed-by: mullan
author vinnie
date Fri, 25 Jan 2013 16:19:39 +0000
parents 4a4b97f7f83b
children 117491dd58c2
files src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Fri Jan 25 13:09:47 2013 +0000
+++ b/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Fri Jan 25 16:19:39 2013 +0000
@@ -2224,11 +2224,11 @@
                         keyId = "01".getBytes("UTF8");
                     }
                 }
-                if (alias == null) {
-                    alias = getUnfriendlyName();
-                }
                 // Trusted certificate
                 if (trustedKeyUsage != null) {
+                    if (alias == null) {
+                        alias = getUnfriendlyName();
+                    }
                     CertEntry certEntry =
                         new CertEntry(cert, keyId, alias, trustedKeyUsage,
                             attributes);