Package com.jalios.jcms.security
Class KeyStoreManager
- java.lang.Object
-
- com.jalios.jcms.security.KeyStoreManager
-
- All Implemented Interfaces:
JPropertiesListener
public class KeyStoreManager extends java.lang.Object implements JPropertiesListener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAUTH_AUTHENTICATION_CRL_DIR_PATHstatic java.lang.StringAUTH_AUTHENTICATION_TRUST_STOREstatic java.lang.StringAUTH_AUTHENTICATION_TRUST_STORE_PASSWORDstatic java.lang.StringAUTH_PRIVATE_KEYstatic java.lang.StringAUTH_PRIVATE_KEY_PASSWORDstatic java.lang.StringAUTH_PRIVATE_KEY_PASSWORD_LEGACY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.security.cert.X509CRL>getCrlMap()static KeyStoreManagergetInstance()java.util.Map<java.lang.String,java.security.PublicKey>getIssuerPublicKeyMap()java.security.PrivateKeygetPrivateKey()booleanisInitialized()voidpropertiesChange(JProperties properties)Invoked after properties have been modified in JCMS and save on disk.static java.security.PrivateKeyreadPrivateKey(java.io.File privateKeyFile, java.lang.String password)Read a private key filestatic ControllerStatusvalidateConfiguration(JProperties jproperties, java.util.List<JcmsMessage> informationMessagesCollector)
-
-
-
Field Detail
-
AUTH_PRIVATE_KEY_PASSWORD
public static final java.lang.String AUTH_PRIVATE_KEY_PASSWORD
- See Also:
- Constant Field Values
-
AUTH_PRIVATE_KEY_PASSWORD_LEGACY
public static final java.lang.String AUTH_PRIVATE_KEY_PASSWORD_LEGACY
- See Also:
- Constant Field Values
-
AUTH_PRIVATE_KEY
public static final java.lang.String AUTH_PRIVATE_KEY
- See Also:
- Constant Field Values
-
AUTH_AUTHENTICATION_TRUST_STORE_PASSWORD
public static final java.lang.String AUTH_AUTHENTICATION_TRUST_STORE_PASSWORD
- See Also:
- Constant Field Values
-
AUTH_AUTHENTICATION_TRUST_STORE
public static final java.lang.String AUTH_AUTHENTICATION_TRUST_STORE
- See Also:
- Constant Field Values
-
AUTH_AUTHENTICATION_CRL_DIR_PATH
public static final java.lang.String AUTH_AUTHENTICATION_CRL_DIR_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static KeyStoreManager getInstance()
-
validateConfiguration
public static ControllerStatus validateConfiguration(JProperties jproperties, java.util.List<JcmsMessage> informationMessagesCollector)
-
isInitialized
public boolean isInitialized()
-
getIssuerPublicKeyMap
public java.util.Map<java.lang.String,java.security.PublicKey> getIssuerPublicKeyMap()
-
getCrlMap
public java.util.Map<java.lang.String,java.security.cert.X509CRL> getCrlMap()
-
getPrivateKey
public java.security.PrivateKey getPrivateKey()
-
propertiesChange
public void propertiesChange(JProperties properties)
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
readPrivateKey
public static java.security.PrivateKey readPrivateKey(java.io.File privateKeyFile, java.lang.String password)Read a private key file- Parameters:
privateKeyFile- the private key filepassword- the password to read the key- Returns:
- the
PrivateKeyobject, or null if any errors occurs
-
-