| | |
| | | else if (!ks.containsAlias(alias) |
| | | || ks |
| | | .entryInstanceOf(alias, KeyStore.TrustedCertificateEntry.class)) |
| | | { |
| | | trustedCert(alias, cf, ks, inStream); |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage msg = ERR_CERTMGR_ALIAS_INVALID.get(alias); |
| | |
| | | throw new KeyStoreException(msg.toString()); |
| | | } |
| | | X509Certificate cert = (X509Certificate) cf.generateCertificate(in); |
| | | if (isSelfSigned(cert)) cert.verify(cert.getPublicKey()); |
| | | if (isSelfSigned(cert)) |
| | | { |
| | | cert.verify(cert.getPublicKey()); |
| | | } |
| | | ks.setCertificateEntry(alias, cert); |
| | | } |
| | | catch (Exception e) |