changeset 8525:141b4c3ce4c2

8006946: PKCS12 test failure due to incorrect alias name Reviewed-by: mullan
author vinnie
date Fri, 25 Jan 2013 16:19:39 +0000
parents b258e0574cb6
children b968a7cf967f
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	Thu Jan 24 18:21:09 2013 +0000
+++ b/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Fri Jan 25 16:19:39 2013 +0000
@@ -2179,11 +2179,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);