Package io.micronaut.http.ssl
Class ResourceCertificateProvider.Config
java.lang.Object
io.micronaut.http.ssl.ResourceCertificateProvider.Config
- All Implemented Interfaces:
Named
- Enclosing class:
- ResourceCertificateProvider
@EachProperty("micronaut.certificate.resource")
public static final class ResourceCertificateProvider.Config
extends Object
Configuration for resource-based certificate material. Supports JKS/PKCS12 and PEM.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExplicit format of the certificate material.getName()
Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.Micronaut resource location of the certificate material to load, for exampleclasspath:certs/server.p12
orfile:/etc/ssl/server.pem
.void
Explicit format of the certificate material.void
setPassword
(@Nullable String password) Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.void
setResource
(@NonNull String resource) Micronaut resource location of the certificate material to load, for exampleclasspath:certs/server.p12
orfile:/etc/ssl/server.pem
.
-
Constructor Details
-
Config
-
-
Method Details
-
getResource
Micronaut resource location of the certificate material to load, for exampleclasspath:certs/server.p12
orfile:/etc/ssl/server.pem
. The actual format and password handling are controlled by the common properties inAbstractCertificateFileConfig
(e.g.format
,password
).- Returns:
- the resource location of the certificate material
-
setResource
Micronaut resource location of the certificate material to load, for exampleclasspath:certs/server.p12
orfile:/etc/ssl/server.pem
. The actual format and password handling are controlled by the common properties inAbstractCertificateFileConfig
(e.g.format
,password
).- Parameters:
resource
- the resource location of the certificate material
-
getName
-
getFormat
Explicit format of the certificate material. If not set, Micronaut will first try to load the file as a key store (JKS/PKCS12) and, if that fails, as PEM. A separatecertificatePath
can only be used with PEM.- Returns:
- the certificate file format or
null
to auto-detect
-
setFormat
Explicit format of the certificate material. If not set, Micronaut will first try to load the file as a key store (JKS/PKCS12) and, if that fails, as PEM. A separatecertificatePath
can only be used with PEM.- Parameters:
format
- the certificate file format ornull
to auto-detect
-
getPassword
Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.- Returns:
- the password or
null
if not required
-
setPassword
Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.- Parameters:
password
- the password ornull
if not required
-