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.p12orfile:/etc/ssl/server.pem.voidExplicit format of the certificate material.voidsetPassword(@Nullable String password) Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.voidsetResource(@NonNull String resource) Micronaut resource location of the certificate material to load, for exampleclasspath:certs/server.p12orfile:/etc/ssl/server.pem.
-
Constructor Details
-
Config
-
-
Method Details
-
getResource
Micronaut resource location of the certificate material to load, for exampleclasspath:certs/server.p12orfile:/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.p12orfile:/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 separatecertificatePathcan only be used with PEM.- Returns:
- the certificate file format or
nullto 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 separatecertificatePathcan only be used with PEM.- Parameters:
format- the certificate file format ornullto auto-detect
-
getPassword
Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.- Returns:
- the password or
nullif not required
-
setPassword
Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.- Parameters:
password- the password ornullif not required
-