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
public abstract class SimpleKeyManagerFactory extends javax.net.ssl.KeyManagerFactory
Helps to implement a customKeyManagerFactory
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SimpleKeyManagerFactory.SimpleKeyManagerFactorySpi
-
Field Summary
Fields Modifier and Type Field Description private static FastThreadLocal<SimpleKeyManagerFactory.SimpleKeyManagerFactorySpi>
CURRENT_SPI
SimpleKeyManagerFactory.SimpleKeyManagerFactorySpi
must have a reference toSimpleKeyManagerFactory
to delegate its callbacks back toSimpleKeyManagerFactory
.private static java.security.Provider
PROVIDER
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleKeyManagerFactory()
Creates a new instance.protected
SimpleKeyManagerFactory(java.lang.String name)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract javax.net.ssl.KeyManager[]
engineGetKeyManagers()
Returns one key manager for each type of key material.protected abstract void
engineInit(java.security.KeyStore keyStore, char[] var2)
Initializes this factory with a source of certificate authorities and related key material.protected abstract void
engineInit(javax.net.ssl.ManagerFactoryParameters managerFactoryParameters)
Initializes this factory with a source of provider-specific key material.
-
-
-
Field Detail
-
PROVIDER
private static final java.security.Provider PROVIDER
-
CURRENT_SPI
private static final FastThreadLocal<SimpleKeyManagerFactory.SimpleKeyManagerFactorySpi> CURRENT_SPI
SimpleKeyManagerFactory.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
.
-
-
Method Detail
-
engineInit
protected abstract void engineInit(java.security.KeyStore keyStore, char[] var2) throws java.lang.Exception
Initializes this factory with a source of certificate authorities and related key material.- Throws:
java.lang.Exception
- See Also:
KeyManagerFactorySpi.engineInit(KeyStore, char[])
-
engineInit
protected abstract void engineInit(javax.net.ssl.ManagerFactoryParameters managerFactoryParameters) throws java.lang.Exception
Initializes this factory with a source of provider-specific key material.- Throws:
java.lang.Exception
- See Also:
KeyManagerFactorySpi.engineInit(ManagerFactoryParameters)
-
engineGetKeyManagers
protected abstract javax.net.ssl.KeyManager[] engineGetKeyManagers()
Returns one key manager for each type of key material.- See Also:
KeyManagerFactorySpi.engineGetKeyManagers()
-
-