--- a/jdk/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java Fri Jan 25 13:09:47 2013 +0000
+++ b/jdk/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);