public class ServerKeyStore
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
ServerKeyStore.Store
Define the store types.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
authorizationToken
Authorization token
|
private SecurityManager.EncryptedKeyStoreFunction |
encryptedKeyStoreWorker
Worker to resolve the in-directory store.
|
private java.lang.String |
keyManagerPassword
Key store manager password
|
private byte[] |
keyStore
Key store file content
|
private java.lang.String |
keyStorePassword
Key store password
|
private static java.util.logging.Logger |
LOG
Logger.
|
private static long |
serialVersionUID
Serial Version ID
|
private static ServerKeyStore |
store
A template instance from which copies are made; if the store is in-directory, these copies
will use unique passwords to encrypt the resulted store.
|
private java.lang.String |
trustServerAlias
Trust server alias
|
private java.lang.String |
webKeyManagerPassword
Web key store manager password
|
private byte[] |
webKeyStore
Web key store file content
|
private java.lang.String |
webKeyStorePassword
Web key store password
|
private java.lang.String |
webServerAlias
Web server alias
|
Modifier | Constructor and Description |
---|---|
private |
ServerKeyStore()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected ServerKeyStore |
clone()
Create a copy of this instance.
|
private static java.lang.String |
getAlias(byte[] store,
char[] password)
Retrieves the server alias from its keys store.
|
java.lang.String |
getAuthorizationToken()
Get authorization token.
|
java.lang.String |
getKeyManagerPassword()
Get KeyStore manager password.
|
byte[] |
getKeyStore()
Get KeyStore file content.
|
java.lang.String |
getKeyStorePassword()
Get KeyStore password.
|
(package private) static ServerKeyStore |
getStore()
Get a copy of the encrypted server store, based on the shared
template . |
java.lang.String |
getTrustServerAlias()
Return the trust server certificate alias.
|
java.lang.String |
getWebKeyManagerPassword()
Get the web key store manager password.
|
byte[] |
getWebKeyStore()
Get the web key store file content.
|
java.lang.String |
getWebKeyStorePassword()
Get the web key store password.
|
java.lang.String |
getWebServerAlias()
Return the web server certificate alias.
|
(package private) static void |
initialize()
Initializes the template
store . |
boolean |
isValid()
Check if the content is valid
|
boolean |
isWebValid()
Check if the web store content is valid
|
private static final long serialVersionUID
private static final java.util.logging.Logger LOG
private static ServerKeyStore store
private byte[] keyStore
private java.lang.String keyStorePassword
private java.lang.String keyManagerPassword
private java.lang.String authorizationToken
private java.lang.String trustServerAlias
private byte[] webKeyStore
private java.lang.String webKeyStorePassword
private java.lang.String webKeyManagerPassword
private java.lang.String webServerAlias
private transient SecurityManager.EncryptedKeyStoreFunction encryptedKeyStoreWorker
private ServerKeyStore()
static void initialize()
store
. Will be called during server initialization, with
the proper server context.static ServerKeyStore getStore()
template
. If
the store is kept in-directory, the copy will contain a store encrypted with unique
passwords for each copy.java.lang.NullPointerException
- If the store
is null
.public byte[] getKeyStore()
public java.lang.String getKeyStorePassword()
public java.lang.String getKeyManagerPassword()
public byte[] getWebKeyStore()
public java.lang.String getWebKeyStorePassword()
public java.lang.String getWebKeyManagerPassword()
public boolean isValid()
true
if all parameters are not null
false
otherwise.public boolean isWebValid()
true
if all parameters are not null
false
otherwise.public java.lang.String getAuthorizationToken()
public java.lang.String getTrustServerAlias()
public java.lang.String getWebServerAlias()
protected ServerKeyStore clone()
clone
in class java.lang.Object
private static java.lang.String getAlias(byte[] store, char[] password)
store
- The bytes serialized keys store (JKS).password
- The keys store password.