Package com.unboundid.util.ssl
Class KeyStoreKeyManagerProperties
java.lang.Object
com.unboundid.util.ssl.KeyStoreKeyManagerProperties
- All Implemented Interfaces:
Serializable
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public final class KeyStoreKeyManagerProperties
extends Object
implements Serializable
This class provides a data structure with information about properties to
use when accessing the
KeyStoreKeyManager.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeyStoreKeyManagerProperties(File keyStoreFile) Creates a new set of key manage provider properties for the specified key store file.KeyStoreKeyManagerProperties(String keyStorePath) Creates a new set of key manage provider properties for the specified key store file. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.Retrieves the alias (nickname) of the certificate chain to use in the target key store, if specified.Retrieves the format for the target key store, if specified.Retrieves the path to the target key store file.char[]Retrieves the PIN needed to access the contents of the key store, if specified.Retrieves the security provider to use to access the key store, if a non-default provider should be used.voidsetAllowNonFIPSInFIPSMode(boolean allowNonFIPSInFIPSMode) Specifies whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.voidsetCertificateAlias(String certificateAlias) Specifies the alias (nickname) of the certificate chain ot use in the target key store.voidsetKeyStoreFile(File keyStoreFile) Specifies the target key store file.voidsetKeyStoreFormat(String keyStoreFormat) Specifies the format for the target key store.voidsetKeyStorePath(String keyStorePath) Specifies the path to the target key store file.voidsetKeyStorePIN(char[] keyStorePIN) Specifies the PIN needed to access the contents of the key store.voidsetKeyStorePIN(String keyStorePIN) Specifies the PIN needed to access the contents of the key store.voidsetProvider(Provider provider) Specifies the security provider to use to access the key store.voidsetValidateKeyStore(boolean validateKeyStore) Specifies whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.toString()Retrieves a string representation of these properties.voidtoString(StringBuilder buffer) Appends a string representation of these properties to the provided buffer.booleanIndicates whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.
-
Constructor Details
-
KeyStoreKeyManagerProperties
Creates a new set of key manage provider properties for the specified key store file.- Parameters:
keyStoreFile- The target key store file. It must not benull.
-
KeyStoreKeyManagerProperties
Creates a new set of key manage provider properties for the specified key store file.- Parameters:
keyStorePath- The path to the target key store file. It must not benull.
-
-
Method Details
-
getKeyStorePath
Retrieves the path to the target key store file.- Returns:
- The path to the target key store file.
-
setKeyStoreFile
Specifies the target key store file.- Parameters:
keyStoreFile- The target key store file. It must not benull.
-
setKeyStorePath
Specifies the path to the target key store file.- Parameters:
keyStorePath- The path to the target key store file. It must not benull.
-
getKeyStorePIN
Retrieves the PIN needed to access the contents of the key store, if specified.- Returns:
- The PIN needed to access the contents of the key store, or
nullif none has been specified.
-
setKeyStorePIN
Specifies the PIN needed to access the contents of the key store.- Parameters:
keyStorePIN- The PIN needed to access the contents of the key store. It may benullif no PIN is needed.
-
setKeyStorePIN
Specifies the PIN needed to access the contents of the key store.- Parameters:
keyStorePIN- The PIN needed to access the contents of the key store. It may benullif no PIN is needed.
-
getKeyStoreFormat
Retrieves the format for the target key store, if specified.- Returns:
- The format for the target key store, or
nullif a default format should be used.
-
setKeyStoreFormat
Specifies the format for the target key store.- Parameters:
keyStoreFormat- The format for the target key store. It may benullif a default format should be used.
-
getCertificateAlias
Retrieves the alias (nickname) of the certificate chain to use in the target key store, if specified.- Returns:
- The alias of the certificate chain to use in the target key store,
or
nullif any acceptable certificate found in the key store may be used.
-
setCertificateAlias
Specifies the alias (nickname) of the certificate chain ot use in the target key store.- Parameters:
certificateAlias- The alias of the certificate chain to use in the target key store. It may benullif any acceptable certificate found in the key store may be used.
-
validateKeyStore
Indicates whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.- Returns:
trueif the key store should be validated before attempting to use it, orfalseif not.
-
setValidateKeyStore
Specifies whether to validate that the provided key store is acceptable and can actually be used to obtain a valid certificate chain.- Parameters:
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.
-
getProvider
Retrieves the security provider to use to access the key store, if a non-default provider should be used.- Returns:
- The security provider to use to access the key store, or
nullif a default provider should be used.
-
setProvider
Specifies the security provider to use to access the key store.- Parameters:
provider- The security provider to use to access the key store. It may benullif a default provider should be used.
-
allowNonFIPSInFIPSMode
Indicates whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.- Returns:
trueif access to a non-FIPS-compliant key store should be allowed even when operating in FIPS-compliant mode, orfalseif not.
-
setAllowNonFIPSInFIPSMode
Specifies whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.- Parameters:
allowNonFIPSInFIPSMode- Indicates whether to allow access to a non-FIPS-compliant key store even when operating in FIPS-compliant mode.
-
toString
Retrieves a string representation of these properties. -
toString
Appends a string representation of these properties to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended. It must not benull.
-