public class PKIXSSLContextFactory extends X509SSLContextFactory
SSLContextFactory.SSLContextFactoryException| Modifier and Type | Field and Description |
|---|---|
static String |
CRL_RELOAD_INTERVAL_PROP |
protected Set<CRL> |
crlCollection |
protected boolean |
enableRevocation |
KEY_PASSWORD_PROP, KEYSTORE_FILE_PROP, KEYSTORE_PASSWORD_PROP, KEYSTORE_PROVIDER_ARGFILE_PROP, KEYSTORE_PROVIDER_ARGTEXT_PROP, KEYSTORE_PROVIDER_CLASS_PROP, KEYSTORE_PROVIDER_PROP, KEYSTORE_TYPE_PROP, TRUSTSTORE_FILE_PROP, TRUSTSTORE_PASSWORD_PROP, TRUSTSTORE_PROVIDER_ARGFILE_PROP, TRUSTSTORE_PROVIDER_ARGTEXT_PROP, TRUSTSTORE_PROVIDER_CLASS_PROP, TRUSTSTORE_PROVIDER_PROP, TRUSTSTORE_TYPE_PROPCONTEXT_PROTOCOL_NAME_PROP, CONTEXT_PROVIDER_NAME_PROP, SECURERANDOM_ALGORITHM_PROP, SECURERANDOM_PROVIDER_NAME_PROP| Constructor and Description |
|---|
PKIXSSLContextFactory() |
PKIXSSLContextFactory(KeyStore keyStore,
char[] keyPassword,
KeyStore trustStore)
Builds an SSLContextFactory using the PKIX algorithm in the
TrustManagerFactory.
|
PKIXSSLContextFactory(KeyStore keyStore,
char[] keyPassword,
KeyStore trustStore,
boolean enableRevocation)
Builds an SSLContextFactory using the PKIX algorithm in the
TrustManagerFactory.
|
PKIXSSLContextFactory(KeyStore keyStore,
String keyPassword,
KeyStore trustStore)
Builds an SSLContextFactory using the PKIX algorithm in the
TrustManagerFactory.
|
PKIXSSLContextFactory(KeyStore keyStore,
String keyPassword,
KeyStore trustStore,
boolean enableRevocation)
Builds an SSLContextFactory using the PKIX algorithm in the
TrustManagerFactory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCrl(CRL crl)
Adds a CRL to the collection used by getCrlCollection() (and thus the
trust manager by default).
|
void |
addCrl(InputStream crlInputStream)
Adds a CRL from an InputStream to the collection used by
getCrlCollection() (and thus the trust manager by default).
|
void |
addCrl(String crlUrl)
Adds a CRL from a URL to the collection used by getCrlCollection() (and
thus the trust manager by default).
|
void |
addCrl(String crlUrl,
long reloadInterval)
Adds a CRL from a URL to the collection used by getCrlCollection() (and
thus the trust manager by default); this CRL will be reloaded
periodically.
|
void |
addCrlCollection(Collection<? extends CRL> crlCollection)
Adds CRLs to the collection used by getCrlCollection() (and thus the
trust manager by default).
|
Callable<X509CRL> |
addReloadableCrl(String crlUrl)
Adds a CRL from a URL to the collection used by getCrlCollection() (and
thus the trust manager by default).
|
protected CertStore |
getCertStore()
Returns the CertStore added to the PKIXParameters in getPKIXParameters().
|
Collection<? extends CRL> |
getCrlCollection()
Returns the Collection of X509CRLs used to initialise the
CollectionCertStoreParameters used in getCertStore().
|
protected PKIXParameters |
getPKIXParameters()
Returns the PKIXParameters used for initialising the
ManagerFactoryParameters in getTrustParams().
|
protected TrustManager[] |
getRawTrustManagers()
Builds TrustManagers from the trust store provided in the constructor,
using a PKIX TrustManagerFactory.
|
protected ManagerFactoryParameters |
getTrustParams()
Returns the ManagerFactoryParameters used for initialising the
TrustManagerFactory in getTrustManagers().
|
CRL |
loadCrl(InputStream crlInputStream)
Builds a CRL object from an InputStream.
|
CRL |
loadCrl(String crlUrl)
Builds a CRL object from a URL.
|
configure, getKeyManagers, getKeyStore, getRawKeyManagers, getTrustManagers, getTrustStore, setKeyManagerWrapper, setKeyPassword, setKeyPasswordCallbackHandler, setKeyStore, setKeyStorePasswordCallbackHandler, setTrustManagerWrapper, setTrustStore, setTrustStorePasswordCallbackHandlerbuildSSLContext, buildSSLContext, clone, getContextProtocol, getContextProvider, getDefaultSecureRandomAlgorithm, getSecureRandom, getSecureRandomProvider, setSecureRandompublic static final String CRL_RELOAD_INTERVAL_PROP
protected boolean enableRevocation
public PKIXSSLContextFactory()
public PKIXSSLContextFactory(KeyStore keyStore, char[] keyPassword, KeyStore trustStore, boolean enableRevocation)
keyStore - KeyStore that contains the key.keyPassword - password to the key.trustStore - KeyStore that contains the trusted X.509 certificates.enableRevocation - sets whether certificate revocation should be enabled.public PKIXSSLContextFactory(KeyStore keyStore, String keyPassword, KeyStore trustStore, boolean enableRevocation)
keyStore - KeyStore that contains the key.keyPassword - password to the key.trustStore - KeyStore that contains the trusted X.509 certificates.enableRevocation - sets whether certificate revocation should be enabled.public PKIXSSLContextFactory(KeyStore keyStore, char[] keyPassword, KeyStore trustStore)
keyStore - KeyStore that contains the key.keyPassword - password to the key.trustStore - KeyStore that contains the trusted X.509 certificates.public PKIXSSLContextFactory(KeyStore keyStore, String keyPassword, KeyStore trustStore)
keyStore - KeyStore that contains the key.keyPassword - password to the key.trustStore - KeyStore that contains the trusted X.509 certificates.protected TrustManager[] getRawTrustManagers() throws SSLContextFactory.SSLContextFactoryException
getRawTrustManagers in class X509SSLContextFactorySSLContextFactory.SSLContextFactoryExceptionprotected ManagerFactoryParameters getTrustParams() throws SSLContextFactory.SSLContextFactoryException
SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionprotected PKIXParameters getPKIXParameters() throws SSLContextFactory.SSLContextFactoryException
SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionprotected CertStore getCertStore() throws SSLContextFactory.SSLContextFactoryException
SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionpublic Collection<? extends CRL> getCrlCollection() throws SSLContextFactory.SSLContextFactoryException
SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionpublic void addCrlCollection(Collection<? extends CRL> crlCollection) throws SSLContextFactory.SSLContextFactoryException
crlCollection - collection of CRLs to add.SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionpublic void addCrl(CRL crl) throws SSLContextFactory.SSLContextFactoryException
crl - CRL to add.SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionpublic void addCrl(InputStream crlInputStream) throws SSLContextFactory.SSLContextFactoryException
crlInputStream - InputStream containing the CRL to read (this is not closed by
this method).SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionpublic void addCrl(String crlUrl) throws SSLContextFactory.SSLContextFactoryException, MalformedURLException, IOException
crlUrl - URL of the CRL to fetch.SSLContextFactoryExceptionIOExceptionMalformedURLExceptionSSLContextFactory.SSLContextFactoryExceptionpublic void addCrl(String crlUrl, long reloadInterval) throws SSLContextFactory.SSLContextFactoryException, MalformedURLException, IOException
crlUrl - URL of the CRL to fetch.reloadInterval - number of seconds between reloads.SSLContextFactoryExceptionMalformedURLExceptionIOExceptionSSLContextFactory.SSLContextFactoryExceptionpublic Callable<X509CRL> addReloadableCrl(String crlUrl) throws SSLContextFactory.SSLContextFactoryException, MalformedURLException, IOException
crlUrl - URL of the CRL to fetch.SSLContextFactoryExceptionMalformedURLExceptionIOExceptionSSLContextFactory.SSLContextFactoryExceptionpublic CRL loadCrl(InputStream crlInputStream) throws SSLContextFactory.SSLContextFactoryException
crlInputStream - InputStream containing the CRL to read (this is not closed by
this method).SSLContextFactoryExceptionSSLContextFactory.SSLContextFactoryExceptionpublic CRL loadCrl(String crlUrl) throws SSLContextFactory.SSLContextFactoryException, IOException, MalformedURLException
crlUrl - URL of the CRL to fetch.SSLContextFactoryExceptionIOExceptionMalformedURLExceptionSSLContextFactory.SSLContextFactoryExceptionCopyright © 2017. All rights reserved.