- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
KeystoreKeys.BuilderBase.KeystoreKeysImpl
Resources from a java keystore (PKCS12, JKS etc.).
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forKeystoreKeys
.static class
KeystoreKeys.BuilderBase<BUILDER extends KeystoreKeys.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends KeystoreKeys> Fluent API builder base forKeystoreKeys
. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeystoreKeys.Builder
builder()
Create a new fluent API builder to customize configuration.static KeystoreKeys.Builder
builder
(KeystoreKeys instance) Create a new fluent API builder from an existing instance.Alias of X.509 certificate of public key.List of aliases used to generate a trusted set of certificates.Alias of an X.509 chain.static KeystoreKeys
Create a new instance from configuration.keyAlias()
Alias of the private key in the keystore.Optional
<char[]> Pass-phrase of the key in the keystore (used for private keys).keystore()
Keystore resource definition.Optional
<char[]> Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).boolean
If you want to build a trust store, call this method to add all certificates present in the keystore to certificate list.type()
Set type of keystore.
-
Field Details
-
DEFAULT_KEYSTORE_TYPE
Default keystore type.- See Also:
-
DEFAULT_PRIVATE_KEY_ALIAS
Default private key alias.- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
keystore
Resource keystore()Keystore resource definition.- Returns:
- keystore resource, from file path, classpath, URL etc.
-
type
String type()Set type of keystore. Defaults to "PKCS12", expected are other keystore types supported by java then can store keys under aliases.- Returns:
- keystore type to load the key
-
passphrase
Optional<char[]> passphrase()Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).- Returns:
- keystore password to use
-
keyAlias
Alias of the private key in the keystore.- Returns:
- alias of the key in the keystore
-
keyPassphrase
Optional<char[]> keyPassphrase()Pass-phrase of the key in the keystore (used for private keys). This is (by default) the same as keystore passphrase - only configure if it differs from keystore passphrase.- Returns:
- pass-phrase of the key
-
certAlias
Alias of X.509 certificate of public key. Used to load both the certificate and public key.- Returns:
- alias under which the certificate is stored in the keystore
-
certChainAlias
Alias of an X.509 chain.- Returns:
- alias of certificate chain in the keystore
-
certAliases
List of aliases used to generate a trusted set of certificates.- Returns:
- aliases of certificates
-
trustStore
boolean trustStore()If you want to build a trust store, call this method to add all certificates present in the keystore to certificate list.- Returns:
- whether this is a trust store
-