public class JSSEEntrustManagerFactoryParameters
extends java.lang.Object
implements javax.net.ssl.ManagerFactoryParameters
JSSEX509TrustManagerFactory
class so that the JSSEX509TrustManager can access the following parameters:
KeyStore - Used to obtain access to the trusted certificatesLDAPDirectory - Used to retrieve certificates and CRLS which are required
for chain validation but are not contained in the KeyStoreClientSettings - Used to specify PKI ClientSettings which may be used
during chain validation
eks = KeyStore.getInstance("Entrust");
eks.load(new FileInputStream(ksIniFile), password.toCharArray());
TrustManagerFactory tmf = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm(), "IAIK_JSSE");
//Pass in the KeyStore, Directory and ClientSettings
JSSEEntrustManagerFactoryParameters parameters =
new JSSEEntrustManagerFactoryParameters(eks, directory, clientSettings);
// For convienance, the KSIniFile can also be used to extract the directory information
// JSSEEntrustManagerFactoryParameters parameters =
// new JSSEEntrustManagerFactoryParameters(eks,new FileInputStream(ksIniFile), password);
// Initialize the TrustManagerFactory with the JSSEEntrustManagerFactoryParameters
tmf.init(parameters);
| Constructor and Description |
|---|
JSSEEntrustManagerFactoryParameters(java.security.KeyStore ks,
java.io.InputStream KSIniFile,
SecureStringBuffer password)
Get the directory setting from the KSIniFile.
|
JSSEEntrustManagerFactoryParameters(java.security.KeyStore ks,
LdapDirectory directory,
ClientSettings clientSettings)
Set the parameters which will be used by the X509TrustManagerFactory
|
| Modifier and Type | Method and Description |
|---|---|
ClientSettings |
getClientSettings()
Return the ClientSettings stored by this class
|
LdapDirectory |
getDirectory()
Return the Directory stored by this class
|
java.security.KeyStore |
getKeyStore()
Returns the KeyStore stored by this class
|
void |
setClientSettings(ClientSettings settings)
Set the ClientSettings which may be used as part of certificate
validation
|
void |
setDirectory(LdapDirectory directory)
Set the LDAP Directory which is used to lookup certificates and
CRLS for certificate validation.
|
public JSSEEntrustManagerFactoryParameters(java.security.KeyStore ks,
LdapDirectory directory,
ClientSettings clientSettings)
ks - the KeyStoredirectory - the LDAPDirectory used to retrieve certificates and CRL'sclientSettings - the ClientSettings. If null is passed in a default
ClientSetting will be used.public JSSEEntrustManagerFactoryParameters(java.security.KeyStore ks,
java.io.InputStream KSIniFile,
SecureStringBuffer password)
throws java.security.NoSuchAlgorithmException,
java.io.IOException,
java.security.KeyStoreException,
java.security.cert.CertificateException
JSSEEntrustManagerFactoryParameters(KeyStore, LdapDirectory, ClientSettings)
constructor. Theks - which contains the certificatesKSIniFile - the inputstream containing the KSIniFile which is used to extract the Directory informationpassword - The SecureStringBuffer used to protect the KSIniFile.java.io.IOExceptionjava.security.NoSuchAlgorithmExceptionjava.security.KeyStoreExceptionjava.security.cert.CertificateExceptionpublic void setDirectory(LdapDirectory directory)
directory - the LDAP directorypublic void setClientSettings(ClientSettings settings)
settings - The ClientSettingspublic java.security.KeyStore getKeyStore()
public LdapDirectory getDirectory()
public ClientSettings getClientSettings()