@Requires(property="micronaut.ssl.enabled",value="true",defaultValue="false") @Requires(property="micronaut.ssl.build-self-signed",value="false",defaultValue="false") @Singleton @Internal public class CertificateProvidedSslBuilder extends SslBuilder<io.netty.handler.ssl.SslContext> implements ServerSslBuilder
SslBuilder
that generates an SslContext
to create a server handle with
SSL support via user configuration.Constructor and Description |
---|
CertificateProvidedSslBuilder(HttpServerConfiguration httpServerConfiguration,
ServerSslConfiguration ssl,
ResourceResolver resourceResolver) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<io.netty.handler.ssl.SslContext> |
build() |
java.util.Optional<io.netty.handler.ssl.SslContext> |
build(SslConfiguration ssl) |
java.util.Optional<io.netty.handler.ssl.SslContext> |
build(SslConfiguration ssl,
HttpVersion httpVersion) |
protected java.util.Optional<java.security.KeyStore> |
getKeyStore(SslConfiguration ssl) |
ServerSslConfiguration |
getSslConfiguration() |
protected java.util.Optional<java.security.KeyStore> |
getTrustStore(SslConfiguration ssl) |
getKeyManagerFactory, getTrustManagerFactory, load
public CertificateProvidedSslBuilder(HttpServerConfiguration httpServerConfiguration, ServerSslConfiguration ssl, ResourceResolver resourceResolver)
httpServerConfiguration
- The HTTP server configurationssl
- The ssl configurationresourceResolver
- The resource resolverpublic ServerSslConfiguration getSslConfiguration()
getSslConfiguration
in interface ServerSslBuilder
public java.util.Optional<io.netty.handler.ssl.SslContext> build()
build
in interface ServerSslBuilder
public java.util.Optional<io.netty.handler.ssl.SslContext> build(SslConfiguration ssl)
build
in class SslBuilder<io.netty.handler.ssl.SslContext>
ssl
- The ssl configurationpublic java.util.Optional<io.netty.handler.ssl.SslContext> build(SslConfiguration ssl, HttpVersion httpVersion)
build
in class SslBuilder<io.netty.handler.ssl.SslContext>
ssl
- The ssl configurationhttpVersion
- The http versionprotected java.util.Optional<java.security.KeyStore> getTrustStore(SslConfiguration ssl) throws java.lang.Exception
getTrustStore
in class SslBuilder<io.netty.handler.ssl.SslContext>
ssl
- The ssl configurationKeyStore
java.lang.Exception
- if there is an errorprotected java.util.Optional<java.security.KeyStore> getKeyStore(SslConfiguration ssl) throws java.lang.Exception
getKeyStore
in class SslBuilder<io.netty.handler.ssl.SslContext>
ssl
- The ssl configurationKeyStore
java.lang.Exception
- if there is an error