Package io.netty.handler.ssl.util
Class SimpleTrustManagerFactory
java.lang.Object
javax.net.ssl.TrustManagerFactory
io.netty.handler.ssl.util.SimpleTrustManagerFactory
- Direct Known Subclasses:
FingerprintTrustManagerFactory
,InsecureTrustManagerFactory
,TrustManagerFactoryWrapper
Helps to implement a custom
TrustManagerFactory
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final FastThreadLocal
<SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi> SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi
must have a reference toSimpleTrustManagerFactory
to delegate its callbacks back toSimpleTrustManagerFactory
.private static final Provider
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new instance.protected
Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TrustManager[]
Returns one trust manager for each type of trust material.protected abstract void
engineInit
(KeyStore keyStore) Initializes this factory with a source of certificate authorities and related trust 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.TrustManagerFactory
getAlgorithm, getDefaultAlgorithm, getInstance, getInstance, getInstance, getProvider, getTrustManagers, init, init
-
Field Details
-
PROVIDER
-
CURRENT_SPI
private static final FastThreadLocal<SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi> CURRENT_SPISimpleTrustManagerFactory.SimpleTrustManagerFactorySpi
must have a reference toSimpleTrustManagerFactory
to delegate its callbacks back toSimpleTrustManagerFactory
. However, it is impossible to do so, becauseTrustManagerFactory
requiresTrustManagerFactorySpi
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 aThreadLocal
.
-
-
Constructor Details
-
SimpleTrustManagerFactory
protected SimpleTrustManagerFactory()Creates a new instance. -
SimpleTrustManagerFactory
Creates a new instance.- Parameters:
name
- the name of thisTrustManagerFactory
-
-
Method Details
-
engineInit
Initializes this factory with a source of certificate authorities and related trust 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:
-
engineGetTrustManagers
Returns one trust manager for each type of trust material.- See Also:
-