Class KeystoreManager
java.lang.Object
com.sun.enterprise.admin.servermgmt.KeystoreManager
- Direct Known Subclasses:
MasterPasswordFileManager,NodeKeystoreManager
- Author:
- kebbs
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchangeKeystorePassword(String oldPassword, String newPassword, File keyStore) Changes the keystore passwordprotected voidchangeSSLCertificateDatabasePassword(RepositoryConfig config, String oldPassword, String newPassword) Changes the password of the keystore, truststore and the key password of the s1as alias.protected voidprotected final voidcopyCertificatesToTrustStore(File configRoot, String masterPassword) protected voidcreateKeyStore(File keyStore, RepositoryConfig config, String masterPassword) Create the default SSL key store using keytool to generate a self signed certificate.protected static StringgetCertificateDN(RepositoryConfig cfg, String CNSuffix) static Stringprotected PEFileLayoutgetFileLayout(RepositoryConfig config) static String
-
Field Details
-
CERTIFICATE_ALIAS
- See Also:
-
INSTANCE_SECURE_ADMIN_ALIAS
- See Also:
-
-
Constructor Details
-
KeystoreManager
public KeystoreManager()
-
-
Method Details
-
getCertificateDN
-
getFileLayout
-
createKeyStore
protected void createKeyStore(File keyStore, RepositoryConfig config, String masterPassword) throws DomainException Create the default SSL key store using keytool to generate a self signed certificate.- Parameters:
keyStore-config-masterPassword-- Throws:
DomainException
-
copyCertificatesToTrustStore
protected final void copyCertificatesToTrustStore(File configRoot, String masterPassword) throws DomainException - Throws:
DomainException
-
changeKeystorePassword
protected void changeKeystorePassword(String oldPassword, String newPassword, File keyStore) throws DomainException Changes the keystore password- Parameters:
oldPassword- the old keystore passwordnewPassword- the new keystore passwordkeyStore- the keystore whose password is to be changed.- Throws:
DomainException
-
changeSSLCertificateDatabasePassword
protected void changeSSLCertificateDatabasePassword(RepositoryConfig config, String oldPassword, String newPassword) throws DomainException Changes the password of the keystore, truststore and the key password of the s1as alias. It is expected that the key / truststores may not exist. This is due to the fact that the user may have deleted them and wishes to set up their own key/truststore- Parameters:
config-oldPassword-newPassword-- Throws:
DomainException
-
chmod
- Throws:
IOException
-
getDASCertDN
-
getInstanceCertDN
-