Class SimpleTrustManagerFactory
java.lang.Object
javax.net.ssl.TrustManagerFactory
io.netty.handler.ssl.util.SimpleTrustManagerFactory
- Direct Known Subclasses:
FingerprintTrustManagerFactory, InsecureTrustManagerFactory, TrustManagerFactoryWrapper
public abstract class SimpleTrustManagerFactory
extends javax.net.ssl.TrustManagerFactory
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.SimpleTrustManagerFactorySpimust have a reference toSimpleTrustManagerFactoryto delegate its callbacks back toSimpleTrustManagerFactory.private static final java.security.Provider -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance.protectedSimpleTrustManagerFactory(java.lang.String name) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract javax.net.ssl.TrustManager[]Returns one trust manager for each type of trust material.protected abstract voidengineInit(java.security.KeyStore keyStore) Initializes this factory with a source of certificate authorities and related trust material.protected abstract voidengineInit(javax.net.ssl.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, initMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
PROVIDER
private static final java.security.Provider PROVIDER -
CURRENT_SPI
private static final FastThreadLocal<SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi> CURRENT_SPISimpleTrustManagerFactory.SimpleTrustManagerFactorySpimust have a reference toSimpleTrustManagerFactoryto delegate its callbacks back toSimpleTrustManagerFactory. However, it is impossible to do so, becauseTrustManagerFactoryrequiresTrustManagerFactorySpiat 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
protected SimpleTrustManagerFactory(java.lang.String name) Creates a new instance.- Parameters:
name- the name of thisTrustManagerFactory
-
-
Method Details
-
engineInit
protected abstract void engineInit(java.security.KeyStore keyStore) throws java.lang.Exception Initializes this factory with a source of certificate authorities and related trust material.- Throws:
java.lang.Exception- See Also:
-
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:
-
engineGetTrustManagers
protected abstract javax.net.ssl.TrustManager[] engineGetTrustManagers()Returns one trust manager for each type of trust material.- See Also:
-