|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.flat502.rox.processing.SSLConfiguration
public class SSLConfiguration
Nested Class Summary | |
---|---|
static class |
SSLConfiguration.ClientAuth
|
Field Summary | |
---|---|
static java.lang.String |
ALL_CIPHER_SUITES
A regular expression that matches all cipher suites. |
static java.lang.String |
ALL_PROTOCOLS
A regular expression that matches all protocols. |
static java.lang.String |
ANON_CIPHER_SUITES
A regular expression that matches only cipher suites that allow for anonymous key exchange. |
static java.lang.String |
TLS_PROTOCOLS
A regular expression that matches all TLS protocols. |
Constructor Summary | |
---|---|
SSLConfiguration()
|
|
SSLConfiguration(java.util.Properties props)
|
|
SSLConfiguration(javax.net.ssl.SSLContext context)
|
Method Summary | |
---|---|
void |
addIdentity(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate[] chain)
|
void |
addTrustedEntities(java.util.Collection<java.security.cert.X509Certificate> certs)
|
void |
addTrustedEntity(java.security.cert.X509Certificate cert)
|
javax.net.ssl.SSLContext |
createContext()
|
SSLConfiguration.ClientAuth |
getClientAuthentication()
|
int |
getHandshakeTimeout()
|
protected java.lang.String[] |
selectCiphersuites(java.lang.String[] supportedCipherSuites)
|
protected java.lang.String[] |
selectProtocols(java.lang.String[] supportedProtocols)
|
void |
setCipherSuitePattern(java.lang.String cipherSuitePattern)
Set the regular expression used to select the SSL cipher suites to use during SSL handshaking. |
void |
setClientAuthentication(SSLConfiguration.ClientAuth auth)
|
void |
setHandshakeTimeout(int timeout)
Configure a timeout value for SSL handshaking. |
void |
setKeyStore(java.security.KeyStore ks,
java.lang.String passphrase)
|
void |
setKeyStore(java.lang.String storeFile,
java.lang.String storePassphrase,
java.lang.String entryPassphrase,
java.lang.String storeType)
|
void |
setProtocolPattern(java.lang.String protocolPattern)
Set the regular expression used to select the SSL protocol suites to use during SSL handshaking. |
void |
setRandomNumberGenerator(java.security.SecureRandom rng)
|
void |
setTrustStore(java.security.KeyStore ts)
|
void |
setTrustStore(java.lang.String storeFile,
java.lang.String passphrase,
java.lang.String storeType)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ANON_CIPHER_SUITES
public static final java.lang.String ALL_CIPHER_SUITES
public static final java.lang.String ALL_PROTOCOLS
public static final java.lang.String TLS_PROTOCOLS
Constructor Detail |
---|
public SSLConfiguration()
public SSLConfiguration(javax.net.ssl.SSLContext context)
public SSLConfiguration(java.util.Properties props) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
Method Detail |
---|
public void setRandomNumberGenerator(java.security.SecureRandom rng)
public void setHandshakeTimeout(int timeout)
If the remote server is not SSL enabled then it falls to some sort of timeout to determine this, since a non-SSL server is waiting for a request from a client, which is in turn waiting for an SSL handshake to be initiated by the server.
This method controls the length of that timeout.
This timeout defaults to 10 seconds.
The new timeout affects only connections initiated subsequent to the completion of this method call.
timeout
- The timeout (in milliseconds). A value of 0 indicates no timeout should be
enforced (not recommended).
java.lang.IllegalArgumentException
- If the timeout provided is negative.public int getHandshakeTimeout()
public void setCipherSuitePattern(java.lang.String cipherSuitePattern)
cipherSuitePattern
- A regular expression for selecting the
set of SSL cipher suites. A null
value
will treated as matching all cipher suites.ALL_CIPHER_SUITES
,
ANON_CIPHER_SUITES
public void setProtocolPattern(java.lang.String protocolPattern)
protocolPattern
- A regular expression for selecting the
set of SSL protocols. A null
value
will treated as matching all protocols.ALL_PROTOCOLS
,
TLS_PROTOCOLS
public void addTrustedEntities(java.util.Collection<java.security.cert.X509Certificate> certs) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public void addTrustedEntity(java.security.cert.X509Certificate cert) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public void addIdentity(java.security.PrivateKey privateKey, java.security.cert.X509Certificate[] chain) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public void setClientAuthentication(SSLConfiguration.ClientAuth auth)
public SSLConfiguration.ClientAuth getClientAuthentication()
public void setKeyStore(java.lang.String storeFile, java.lang.String storePassphrase, java.lang.String entryPassphrase, java.lang.String storeType) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public void setKeyStore(java.security.KeyStore ks, java.lang.String passphrase) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public void setTrustStore(java.lang.String storeFile, java.lang.String passphrase, java.lang.String storeType) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public void setTrustStore(java.security.KeyStore ts) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public javax.net.ssl.SSLContext createContext() throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String[] selectCiphersuites(java.lang.String[] supportedCipherSuites)
protected java.lang.String[] selectProtocols(java.lang.String[] supportedProtocols)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |