org.ldaptive.ssl
Class CredentialConfigFactory

java.lang.Object
  extended by org.ldaptive.ssl.CredentialConfigFactory

public final class CredentialConfigFactory
extends Object

Utility class for creating credential configs when the underlying credential is already available for use.

Version:
$Revision: 3121 $ $Date: 2015-10-02 16:24:35 -0400 (Fri, 02 Oct 2015) $
Author:
Middleware Services

Method Summary
static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore)
          Creates a KeyStoreCredentialConfig from the supplied truststore.
static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore, KeyStore keyStore, String keyStorePassword)
          Creates a KeyStoreCredentialConfig from the supplied truststore, keystore and password.
static CredentialConfig createKeyStoreCredentialConfig(KeyStore keyStore, String keyStorePassword)
          Creates a KeyStoreCredentialConfig from the supplied keystore and password.
static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore, String[] trustStoreAliases)
          Creates a KeyStoreCredentialConfig from the supplied truststore.
static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore, String[] trustStoreAliases, KeyStore keyStore, String keyStorePassword, String[] keyStoreAliases)
          Creates a KeyStoreCredentialConfig from the supplied truststore, keystore and password.
static CredentialConfig createKeyStoreCredentialConfig(KeyStore keyStore, String keyStorePassword, String[] keyStoreAliases)
          Creates a KeyStoreCredentialConfig from the supplied keystore and password.
static CredentialConfig createX509CredentialConfig(String trustCertificates)
          Creates a X509CredentialConfig from PEM encoded certificate(s).
static CredentialConfig createX509CredentialConfig(X509Certificate[] trustCertificates)
          Creates a X509CredentialConfig from the supplied trust certificates.
static CredentialConfig createX509CredentialConfig(X509Certificate[] trustCertificates, X509Certificate authenticationCertificate, PrivateKey authenticationKey)
          Creates a X509CredentialConfig from the supplied trust certificates, authentication certificate and private key.
static CredentialConfig createX509CredentialConfig(X509Certificate authenticationCertificate, PrivateKey authenticationKey)
          Creates a X509CredentialConfig from the supplied authentication certificate and private key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createKeyStoreCredentialConfig

public static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore)
Creates a KeyStoreCredentialConfig from the supplied truststore.

Parameters:
trustStore - to create credential config from
Returns:
credential config

createKeyStoreCredentialConfig

public static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore,
                                                              String[] trustStoreAliases)
Creates a KeyStoreCredentialConfig from the supplied truststore.

Parameters:
trustStore - to create credential config from
trustStoreAliases - to use in the truststore
Returns:
credential config

createKeyStoreCredentialConfig

public static CredentialConfig createKeyStoreCredentialConfig(KeyStore keyStore,
                                                              String keyStorePassword)
Creates a KeyStoreCredentialConfig from the supplied keystore and password.

Parameters:
keyStore - to create credential config from
keyStorePassword - to unlock the keystore
Returns:
credential config

createKeyStoreCredentialConfig

public static CredentialConfig createKeyStoreCredentialConfig(KeyStore keyStore,
                                                              String keyStorePassword,
                                                              String[] keyStoreAliases)
Creates a KeyStoreCredentialConfig from the supplied keystore and password.

Parameters:
keyStore - to create credential config from
keyStorePassword - to unlock the keystore
keyStoreAliases - to use in the keystore
Returns:
credential config

createKeyStoreCredentialConfig

public static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore,
                                                              KeyStore keyStore,
                                                              String keyStorePassword)
Creates a KeyStoreCredentialConfig from the supplied truststore, keystore and password.

Parameters:
trustStore - to create credential config from
keyStore - to create credential config from
keyStorePassword - to unlock the keystore
Returns:
credential config

createKeyStoreCredentialConfig

public static CredentialConfig createKeyStoreCredentialConfig(KeyStore trustStore,
                                                              String[] trustStoreAliases,
                                                              KeyStore keyStore,
                                                              String keyStorePassword,
                                                              String[] keyStoreAliases)
Creates a KeyStoreCredentialConfig from the supplied truststore, keystore and password.

Parameters:
trustStore - to create credential config from
trustStoreAliases - to use in the truststore
keyStore - to create credential config from
keyStorePassword - to unlock the keystore
keyStoreAliases - to use in the keystore
Returns:
credential config

createX509CredentialConfig

public static CredentialConfig createX509CredentialConfig(X509Certificate[] trustCertificates)
Creates a X509CredentialConfig from the supplied trust certificates.

Parameters:
trustCertificates - to create credential config from
Returns:
credential config

createX509CredentialConfig

public static CredentialConfig createX509CredentialConfig(X509Certificate authenticationCertificate,
                                                          PrivateKey authenticationKey)
Creates a X509CredentialConfig from the supplied authentication certificate and private key.

Parameters:
authenticationCertificate - to create credential config from
authenticationKey - that belongs to the certificate
Returns:
credential config

createX509CredentialConfig

public static CredentialConfig createX509CredentialConfig(X509Certificate[] trustCertificates,
                                                          X509Certificate authenticationCertificate,
                                                          PrivateKey authenticationKey)
Creates a X509CredentialConfig from the supplied trust certificates, authentication certificate and private key.

Parameters:
trustCertificates - to create credential config from
authenticationCertificate - to create credential config from
authenticationKey - that belongs to the certificate
Returns:
credential config

createX509CredentialConfig

public static CredentialConfig createX509CredentialConfig(String trustCertificates)
Creates a X509CredentialConfig from PEM encoded certificate(s).

Parameters:
trustCertificates - to create credential config from
Returns:
credential config


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.