public abstract class SimpleTrustManagerFactory
extends javax.net.ssl.TrustManagerFactory
TrustManagerFactory
.Modifier and Type | Class and Description |
---|---|
(package private) static class |
SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi |
Modifier and Type | Field and Description |
---|---|
private static FastThreadLocal<SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi> |
CURRENT_SPI
SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi must have a reference to SimpleTrustManagerFactory
to delegate its callbacks back to SimpleTrustManagerFactory . |
private static java.security.Provider |
PROVIDER |
Modifier | Constructor and Description |
---|---|
protected |
SimpleTrustManagerFactory()
Creates a new instance.
|
protected |
SimpleTrustManagerFactory(java.lang.String name)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract javax.net.ssl.TrustManager[] |
engineGetTrustManagers()
Returns one trust manager for each type of trust material.
|
protected abstract void |
engineInit(java.security.KeyStore keyStore)
Initializes this factory with a source of certificate authorities and related trust material.
|
protected abstract void |
engineInit(javax.net.ssl.ManagerFactoryParameters managerFactoryParameters)
Initializes this factory with a source of provider-specific key material.
|
private static final java.security.Provider PROVIDER
private static final FastThreadLocal<SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi> CURRENT_SPI
SimpleTrustManagerFactory.SimpleTrustManagerFactorySpi
must have a reference to SimpleTrustManagerFactory
to delegate its callbacks back to SimpleTrustManagerFactory
. However, it is impossible to do so,
because TrustManagerFactory
requires TrustManagerFactorySpi
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 a ThreadLocal
.protected SimpleTrustManagerFactory()
protected SimpleTrustManagerFactory(java.lang.String name)
name
- the name of this TrustManagerFactory
protected abstract void engineInit(java.security.KeyStore keyStore) throws java.lang.Exception
java.lang.Exception
TrustManagerFactorySpi.engineInit(KeyStore)
protected abstract void engineInit(javax.net.ssl.ManagerFactoryParameters managerFactoryParameters) throws java.lang.Exception
java.lang.Exception
TrustManagerFactorySpi.engineInit(ManagerFactoryParameters)
protected abstract javax.net.ssl.TrustManager[] engineGetTrustManagers()
TrustManagerFactorySpi.engineGetTrustManagers()