org.edg.security.trustmanager
Class ContextWrapper
java.lang.Object
|
+--org.edg.security.trustmanager.ContextWrapper
- All Implemented Interfaces:
- SSLContextWrapper
- public class ContextWrapper
- extends java.lang.Object
- implements SSLContextWrapper
Constructor Summary |
ContextWrapper(java.util.Properties inputConfig)
|
ContextWrapper(java.util.Properties inputConfig,
org.bouncycastle.openssl.PasswordFinder finder)
Creates a new instance of ContextWrapper |
ContextWrapper(java.util.Properties inputConfig,
java.security.cert.X509Certificate[] chain,
java.security.PrivateKey key)
|
Method Summary |
static long |
getIntervalSecs(java.lang.String intervalBlob)
|
javax.net.ssl.X509KeyManager |
getKeyManager()
|
javax.net.ssl.SSLServerSocketFactory |
getServerSocketFactory()
|
javax.net.ssl.SSLSocketFactory |
getSocketFactory()
|
void |
init(org.bouncycastle.openssl.PasswordFinder finder,
java.security.cert.X509Certificate[] chain,
java.security.PrivateKey key)
|
void |
initKeyManagers(org.bouncycastle.openssl.PasswordFinder finder)
|
void |
initKeyManagers(java.security.cert.X509Certificate[] chain,
java.security.PrivateKey key)
|
void |
loadConfig(java.util.Properties inputConfig)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CREDENTIALS_PROXY_FILE
public static final java.lang.String CREDENTIALS_PROXY_FILE
- See Also:
- Constant Field Values
CREDENTIALS_UPDATE_INTERVAL
public static final java.lang.String CREDENTIALS_UPDATE_INTERVAL
- See Also:
- Constant Field Values
CREDENTIALS_CERT_FILE
public static final java.lang.String CREDENTIALS_CERT_FILE
- See Also:
- Constant Field Values
CREDENTIALS_KEY_FILE
public static final java.lang.String CREDENTIALS_KEY_FILE
- See Also:
- Constant Field Values
CREDENTIALS_KEY_PASSWD
public static final java.lang.String CREDENTIALS_KEY_PASSWD
- See Also:
- Constant Field Values
CREDENTIALS_STORE_FILE
public static final java.lang.String CREDENTIALS_STORE_FILE
- See Also:
- Constant Field Values
CREDENTIALS_STORE_TYPE
public static final java.lang.String CREDENTIALS_STORE_TYPE
- See Also:
- Constant Field Values
CREDENTIALS_STORE_PASSWD
public static final java.lang.String CREDENTIALS_STORE_PASSWD
- See Also:
- Constant Field Values
CA_FILES
public static final java.lang.String CA_FILES
- See Also:
- Constant Field Values
CA_STORE_FILE
public static final java.lang.String CA_STORE_FILE
- See Also:
- Constant Field Values
CA_STORE_TYPE
public static final java.lang.String CA_STORE_TYPE
- See Also:
- Constant Field Values
CA_STORE_PASSWD
public static final java.lang.String CA_STORE_PASSWD
- See Also:
- Constant Field Values
CA_STORE_ALIAS
public static final java.lang.String CA_STORE_ALIAS
- See Also:
- Constant Field Values
CRL_FILES
public static final java.lang.String CRL_FILES
- See Also:
- Constant Field Values
CRL_ENABLED
public static final java.lang.String CRL_ENABLED
- See Also:
- Constant Field Values
CRL_REQUIRED
public static final java.lang.String CRL_REQUIRED
- See Also:
- Constant Field Values
CRL_UPDATE_INTERVAL
public static final java.lang.String CRL_UPDATE_INTERVAL
- See Also:
- Constant Field Values
LOG_CONF_FILE
public static final java.lang.String LOG_CONF_FILE
- See Also:
- Constant Field Values
LOG_FILE
public static final java.lang.String LOG_FILE
- See Also:
- Constant Field Values
SSL_PROTOCOL
public static final java.lang.String SSL_PROTOCOL
- See Also:
- Constant Field Values
CONF_FILE
public static final java.lang.String CONF_FILE
- See Also:
- Constant Field Values
LOG_FILE_DEFAULT
public static final java.lang.String LOG_FILE_DEFAULT
- See Also:
- Constant Field Values
KEYSTORE_TYPE_DEFAULT
public static final java.lang.String KEYSTORE_TYPE_DEFAULT
- See Also:
- Constant Field Values
CRL_UPDATE_INTERVAL_DEFAULT
public static final java.lang.String CRL_UPDATE_INTERVAL_DEFAULT
- See Also:
- Constant Field Values
CRL_REQUIRED_DEFAULT
public static final java.lang.String CRL_REQUIRED_DEFAULT
- See Also:
- Constant Field Values
SSL_PROTOCOL_DEFAULT
public static final java.lang.String SSL_PROTOCOL_DEFAULT
- See Also:
- Constant Field Values
CRL_ENABLED_DEFAULT
public static final java.lang.String CRL_ENABLED_DEFAULT
- See Also:
- Constant Field Values
CREDENTIALS_UPDATE_INTERVAL_DEAFULT
public static final java.lang.String CREDENTIALS_UPDATE_INTERVAL_DEAFULT
- See Also:
- Constant Field Values
CA_FILES_DEFAULT
public static final java.lang.String CA_FILES_DEFAULT
- See Also:
- Constant Field Values
INT_KEYSTORE_PASSWD
public static final java.lang.String INT_KEYSTORE_PASSWD
- See Also:
- Constant Field Values
config
public CaseInsensitiveProperties config
identityKeyManagers
public javax.net.ssl.KeyManager[] identityKeyManagers
trustAnchors
public java.util.Vector trustAnchors
crls
public java.util.Vector crls
certReader
public FileCertReader certReader
trustManager
public CRLFileTrustManager trustManager
overrideExpirationCheck
public boolean overrideExpirationCheck
- only for testing!
overrides the expiration checking during the cert loading so that
expired certs can be loaded to test the certificate rejection at the
server end.
ContextWrapper
public ContextWrapper(java.util.Properties inputConfig)
throws java.lang.Exception
ContextWrapper
public ContextWrapper(java.util.Properties inputConfig,
java.security.cert.X509Certificate[] chain,
java.security.PrivateKey key)
throws java.lang.Exception
ContextWrapper
public ContextWrapper(java.util.Properties inputConfig,
org.bouncycastle.openssl.PasswordFinder finder)
throws java.lang.Exception
- Creates a new instance of ContextWrapper
loadConfig
public void loadConfig(java.util.Properties inputConfig)
throws java.lang.Exception
java.lang.Exception
getServerSocketFactory
public javax.net.ssl.SSLServerSocketFactory getServerSocketFactory()
throws javax.net.ssl.SSLException
- Specified by:
getServerSocketFactory
in interface SSLContextWrapper
javax.net.ssl.SSLException
getSocketFactory
public javax.net.ssl.SSLSocketFactory getSocketFactory()
throws javax.net.ssl.SSLException
- Specified by:
getSocketFactory
in interface SSLContextWrapper
javax.net.ssl.SSLException
init
public void init(org.bouncycastle.openssl.PasswordFinder finder,
java.security.cert.X509Certificate[] chain,
java.security.PrivateKey key)
throws java.lang.Exception
java.lang.Exception
initKeyManagers
public void initKeyManagers(org.bouncycastle.openssl.PasswordFinder finder)
throws java.lang.Exception
java.lang.Exception
initKeyManagers
public void initKeyManagers(java.security.cert.X509Certificate[] chain,
java.security.PrivateKey key)
throws java.lang.Exception
java.lang.Exception
getIntervalSecs
public static long getIntervalSecs(java.lang.String intervalBlob)
throws java.lang.Exception
java.lang.Exception
getKeyManager
public javax.net.ssl.X509KeyManager getKeyManager()