Package io.netty.handler.ssl.util
Class SimpleKeyManagerFactory
java.lang.Object
javax.net.ssl.KeyManagerFactory
io.netty.handler.ssl.util.SimpleKeyManagerFactory
- Direct Known Subclasses:
KeyManagerFactoryWrapper
Helps to implement a custom
KeyManagerFactory
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final FastThreadLocal
<SimpleKeyManagerFactory.SimpleKeyManagerFactorySpi> SimpleKeyManagerFactory.SimpleKeyManagerFactorySpi
must have a reference toSimpleKeyManagerFactory
to delegate its callbacks back toSimpleKeyManagerFactory
.private static final Provider
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new instance.protected
Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract KeyManager[]
Returns one key manager for each type of key material.protected abstract void
engineInit
(KeyStore keyStore, char[] var2) Initializes this factory with a source of certificate authorities and related key material.protected abstract void
engineInit
(ManagerFactoryParameters managerFactoryParameters) Initializes this factory with a source of provider-specific key material.Methods inherited from class javax.net.ssl.KeyManagerFactory
getAlgorithm, getDefaultAlgorithm, getInstance, getInstance, getInstance, getKeyManagers, getProvider, init, init
-
Field Details
-
PROVIDER
-
CURRENT_SPI
private static final FastThreadLocal<SimpleKeyManagerFactory.SimpleKeyManagerFactorySpi> CURRENT_SPISimpleKeyManagerFactory.SimpleKeyManagerFactorySpi
must have a reference toSimpleKeyManagerFactory
to delegate its callbacks back toSimpleKeyManagerFactory
. However, it is impossible to do so, becauseKeyManagerFactory
requiresKeyManagerFactorySpi
at construction time and does not provide a way to access it later. To work around this issue, we use an ugly hack which uses aFastThreadLocal
.
-
-
Constructor Details
-
SimpleKeyManagerFactory
protected SimpleKeyManagerFactory()Creates a new instance. -
SimpleKeyManagerFactory
Creates a new instance.- Parameters:
name
- the name of thisKeyManagerFactory
-
-
Method Details
-
engineInit
Initializes this factory with a source of certificate authorities and related key material.- Throws:
Exception
- See Also:
-
engineInit
protected abstract void engineInit(ManagerFactoryParameters managerFactoryParameters) throws Exception Initializes this factory with a source of provider-specific key material.- Throws:
Exception
- See Also:
-
engineGetKeyManagers
Returns one key manager for each type of key material.- See Also:
-