@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class KeyStoreKeyManagerProperties extends java.lang.Object implements java.io.Serializable
KeyStoreKeyManager
.Constructor and Description |
---|
KeyStoreKeyManagerProperties(java.io.File keyStoreFile)
Creates a new set of key manage provider properties for the specified key
store file.
|
KeyStoreKeyManagerProperties(java.lang.String keyStorePath)
Creates a new set of key manage provider properties for the specified key
store file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowNonFIPSInFIPSMode()
Indicates whether to allow access to a non-FIPS 140-2-compliant key store
even when operating in FIPS-compliant mode.
|
java.lang.String |
getCertificateAlias()
Retrieves the alias (nickname) of the certificate chain to use in the
target key store, if specified.
|
java.lang.String |
getKeyStoreFormat()
Retrieves the format for the target key store, if specified.
|
java.lang.String |
getKeyStorePath()
Retrieves the path to the target key store file.
|
char[] |
getKeyStorePIN()
Retrieves the PIN needed to access the contents of the key store, if
specified.
|
java.security.Provider |
getProvider()
Retrieves the security provider to use to access the key store, if a
non-default provider should be used.
|
void |
setAllowNonFIPSInFIPSMode(boolean allowNonFIPSInFIPSMode)
Specifies whether to allow access to a non-FIPS 140-2 compliant key store
even when operating in FIPS-compliant mode.
|
void |
setCertificateAlias(java.lang.String certificateAlias)
Specifies the alias (nickname) of the certificate chain ot use in the
target key store.
|
void |
setKeyStoreFile(java.io.File keyStoreFile)
Specifies the target key store file.
|
void |
setKeyStoreFormat(java.lang.String keyStoreFormat)
Specifies the format for the target key store.
|
void |
setKeyStorePath(java.lang.String keyStorePath)
Specifies the path to the target key store file.
|
void |
setKeyStorePIN(char[] keyStorePIN)
Specifies the PIN needed to access the contents of the key store.
|
void |
setKeyStorePIN(java.lang.String keyStorePIN)
Specifies the PIN needed to access the contents of the key store.
|
void |
setProvider(java.security.Provider provider)
Specifies the security provider to use to access the key store.
|
void |
setValidateKeyStore(boolean validateKeyStore)
Specifies whether to validate that the provided key store is acceptable and
can actually be used to obtain a valid certificate chain.
|
java.lang.String |
toString()
Retrieves a string representation of these properties.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of these properties to the provided buffer.
|
boolean |
validateKeyStore()
Indicates whether to validate that the provided key store is acceptable and
can actually be used to obtain a valid certificate chain.
|
public KeyStoreKeyManagerProperties(@NotNull java.io.File keyStoreFile)
keyStoreFile
- The target key store file. It must not be
null
.public KeyStoreKeyManagerProperties(@NotNull java.lang.String keyStorePath)
keyStorePath
- The path to the target key store file. It must not
be null
.@NotNull public java.lang.String getKeyStorePath()
public void setKeyStoreFile(@NotNull java.io.File keyStoreFile)
keyStoreFile
- The target key store file. It must not be
null
.public void setKeyStorePath(@NotNull java.lang.String keyStorePath)
keyStorePath
- The path to the target key store file. It must not
be null
.@Nullable public char[] getKeyStorePIN()
null
if none has been specified.public void setKeyStorePIN(@Nullable char[] keyStorePIN)
keyStorePIN
- The PIN needed to access the contents of the key
store. It may be null
if no PIN is needed.public void setKeyStorePIN(@Nullable java.lang.String keyStorePIN)
keyStorePIN
- The PIN needed to access the contents of the key
store. It may be null
if no PIN is needed.@Nullable public java.lang.String getKeyStoreFormat()
null
if a default
format should be used.public void setKeyStoreFormat(@Nullable java.lang.String keyStoreFormat)
keyStoreFormat
- The format for the target key store. It may be
null
if a default format should be used.@Nullable public java.lang.String getCertificateAlias()
null
if any acceptable certificate found in the key
store may be used.public void setCertificateAlias(@Nullable java.lang.String certificateAlias)
certificateAlias
- The alias of the certificate chain to use in the
target key store. It may be null
if any
acceptable certificate found in the key store may
be used.public boolean validateKeyStore()
true
if the key store should be validated before
attempting to use it, or false
if not.public void setValidateKeyStore(boolean validateKeyStore)
validateKeyStore
- Indicates whether to validate that the provided
key store is acceptable and can actually be used
to obtain a valid certificate chain. If a
certificate alias was specified, then this will
ensure that the key store contains a valid
private key entry with that alias. If no
certificate alias was specified, then this will
ensure that the key store contains at least one
valid private key entry.@Nullable public java.security.Provider getProvider()
null
if a default provider should be used.public void setProvider(@Nullable java.security.Provider provider)
provider
- The security provider to use to access the key store. It
may be null
if a default provider should be used.public boolean allowNonFIPSInFIPSMode()
true
if access to a non-FIPS-compliant key store should be
allowed even when operating in FIPS-compliant mode, or
false
if not.public void setAllowNonFIPSInFIPSMode(boolean allowNonFIPSInFIPSMode)
allowNonFIPSInFIPSMode
- Indicates whether to allow access to a
non-FIPS-compliant key store even when
operating in FIPS-compliant mode.@NotNull public java.lang.String toString()
toString
in class java.lang.Object