8006946: PKCS12 test failure due to incorrect alias name

Reviewed-by: mullan
This commit is contained in:
Vinnie Ryan 2013-01-25 16:19:39 +00:00
parent 355fea6f2a
commit 241fc73e25

View File

@ -2224,11 +2224,11 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
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);