Package io.micronaut.http.netty
Class NettyTlsUtils
java.lang.Object
io.micronaut.http.netty.NettyTlsUtils
Common utilities for netty TLS support.
- Since:
- 4.0.0
- Author:
- Jonas Konrad
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.netty.handler.ssl.SslProvider
The SSL provider to use.static @NonNull KeyManagerFactory
storeToFactory
(@NonNull SslConfiguration ssl, @Nullable KeyStore keyStore) Create aKeyManagerFactory
from aKeyStore
.
-
Constructor Details
-
NettyTlsUtils
public NettyTlsUtils()
-
-
Method Details
-
sslProvider
public static io.netty.handler.ssl.SslProvider sslProvider()The SSL provider to use.- Returns:
- The provider
-
storeToFactory
@NonNull public static @NonNull KeyManagerFactory storeToFactory(@NonNull @NonNull SslConfiguration ssl, @Nullable @Nullable KeyStore keyStore) throws Exception Create aKeyManagerFactory
from aKeyStore
. This is basically likeSslBuilder.getKeyManagerFactory(SslConfiguration)
, except it uses factories optimized for netty openssl if possible.- Parameters:
ssl
- The ssl configurationkeyStore
- The key store, i.e. the return value ofSslBuilder.getKeyStore(SslConfiguration)
- Returns:
- The
KeyManagerFactory
containing the key store - Throws:
Exception
-