- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
Keys.BuilderBase.KeysImpl
Configuration of keys. If a key is defined in multiple places (keystore, pem, or explicit), the order of preference is:
- Explicit instance will be used
- Keystore will be used
- PEM will be used
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forKeys
.static class
Keys.BuilderBase<BUILDER extends Keys.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Keys> Fluent API builder base forKeys
. -
Method Summary
Modifier and TypeMethodDescriptionstatic Keys.Builder
builder()
Create a new fluent API builder to customize configuration.static Keys.Builder
Create a new fluent API builder from an existing instance.The X.509 Certificate Chain.certs()
The X.509 Certificates.static Keys
create()
Create a new instance with default values.static Keys
Create a new instance from configuration.keystore()
Configure keys from a keystore.pem()
Configure keys from pem file(s).The private key of this config if configured.The public X.509 Certificate if configured.The public key of this config if configured.
-
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
-
create
Create a new instance with default values.- Returns:
- a new instance
-
keystore
Optional<KeystoreKeys> keystore()Configure keys from a keystore. Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Returns:
- keystore configuration
-
pem
Configure keys from pem file(s). Once the config object is built, this option will ALWAYS be empty. All keys from the keystore will be populated toprivateKey()
,publicKey()
,publicCert()
etc.- Returns:
- pem based definition
-
publicKey
The public key of this config if configured.- Returns:
- the public key of this config or empty if not configured
-
privateKey
Optional<PrivateKey> privateKey()The private key of this config if configured.- Returns:
- the private key of this config or empty if not configured
-
publicCert
Optional<X509Certificate> publicCert()The public X.509 Certificate if configured.- Returns:
- the public certificate of this config or empty if not configured
-
certChain
List<X509Certificate> certChain()The X.509 Certificate Chain.- Returns:
- the certificate chain or empty list if not configured
-
certs
List<X509Certificate> certs()The X.509 Certificates.- Returns:
- the certificates configured or empty list if none configured
-