Class OpenSslKeyMaterialProvider
java.lang.Object
io.netty.handler.ssl.OpenSslKeyMaterialProvider
- Direct Known Subclasses:
OpenSslCachingKeyMaterialProvider, OpenSslX509KeyManagerFactory.OpenSslKeyManagerFactorySpi.ProviderFactory.OpenSslPopulatedKeyMaterialProvider
Provides
OpenSslKeyMaterial for a given alias.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference<OpenSslKeyMaterialProvider.MaterialCache> private final X509KeyManagerprivate final Stringprivate static final OpenSslKeyMaterialProvider.MaterialCache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) OpenSslKeyMaterialchooseKeyMaterial(ByteBufAllocator allocator, String alias) Returns theOpenSslKeyMaterialornull(if none) that should be used during the handshake by OpenSSL.private OpenSslKeyMaterialcreateKeyMaterial(ByteBufAllocator allocator, X509Certificate[] certificates, PrivateKey key) (package private) voiddestroy()Will be invoked once the provider should be destroyed.private void(package private) X509KeyManagerReturns the underlyingX509KeyManagerthat is used.(package private) static voidvalidateKeyMaterialSupported(X509Certificate[] keyCertChain, PrivateKey key, String keyPassword) private static voidvalidateSupported(X509Certificate[] certificates) private static voidvalidateSupported(PrivateKey key, String password)
-
Field Details
-
SENTINEL_DESTROYED
-
keyManager
-
password
-
cache
-
-
Constructor Details
-
OpenSslKeyMaterialProvider
OpenSslKeyMaterialProvider(X509KeyManager keyManager, String password)
-
-
Method Details
-
validateKeyMaterialSupported
static void validateKeyMaterialSupported(X509Certificate[] keyCertChain, PrivateKey key, String keyPassword) throws SSLException - Throws:
SSLException
-
validateSupported
- Throws:
SSLException
-
validateSupported
- Throws:
SSLException
-
keyManager
X509KeyManager keyManager()Returns the underlyingX509KeyManagerthat is used. -
chooseKeyMaterial
Returns theOpenSslKeyMaterialornull(if none) that should be used during the handshake by OpenSSL.- Throws:
Exception
-
createKeyMaterial
private OpenSslKeyMaterial createKeyMaterial(ByteBufAllocator allocator, X509Certificate[] certificates, PrivateKey key) throws Exception - Throws:
Exception
-
destroy
void destroy()Will be invoked once the provider should be destroyed. -
destroyCache
private void destroyCache()
-