|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--iaik.security.ssl.SSLContext
This class and its subclasses are used to define a SSL/TLS security policy
for an SSLTransport. Also see SSLClientContext and
SSLServerContext.
The settings this class contains are:
new ChainVerifier()
new CipherSuiteList(CipherSuiteList.L_DEFAULT)
NullCompression only
SessionManager.getDefault()
SecurityProvider.getProvider().getSecureRandom()
false
VERSION_SSL30, VERSION_TLS10
null
SSLClientContext,
SSLServerContext,
CipherSuite,
CipherSuiteList,
CompressionMethod,
SessionManager,
DefaultSessionManager,
ChainVerifier| Field Summary | |
static int |
CERTTYPE_DSS_FIXED_DH
Certificate containing a Diffie-Hellman key. |
static int |
CERTTYPE_DSS_SIGN
Certificate containing a DSA key. |
static int |
CERTTYPE_RSA_FIXED_DH
Certificate containing a Diffie-Hellman key. |
static int |
CERTTYPE_RSA_SIGN
Certificate containing an RSA key. |
static int |
CERTTYPE_UNKNOWN
Certificate of unknown type. |
static double |
LIBRARY_VERSION
iSaSiLk library version. |
static java.lang.String |
LIBRARY_VERSION_STRING
iSaSiLk library version as a String. |
static int |
VERSION_NOT_CONNECTED
Version number constant for not yet connected. |
static int |
VERSION_SSL20
Version number constant for SSL 2.0. |
static int |
VERSION_SSL30
Version number constant for SSL 3.0. |
static int |
VERSION_TLS10
Version number constant for TLS 1.0. |
| Method Summary | |
void |
addTrustedCertificate(X509Certificate cert)
Add a trusted certificate. |
abstract java.lang.Object |
clone()
|
static X509Certificate[] |
convertCertificateChain(Certificate[] certificateChain)
Deprecated. no replacement |
int[] |
getAllowedProtocolVersions()
Get the protocol versions enabled for this context. |
boolean |
getCacheTerminatedSessions()
Returns whether or not to cache improperly terminated sessions. |
ChainVerifier |
getChainVerifier()
Get the ChainVerifier for this context. |
java.io.PrintWriter |
getDebugStream()
Get the debug stream for this context. |
CipherSuiteList |
getEnabledCipherSuiteList()
Returns the cipher suites which are enabled in this SSLContext. |
CipherSuite[] |
getEnabledCipherSuites()
Deprecated. use getEnabledCipherSuiteList() instead |
CompressionMethod[] |
getEnabledCompressionMethods()
Returns the compression methods which are enabled in this SSLContext. |
SecureRandom |
getRandomGenerator()
Returns the random number generator currently used by this SSLContext. |
SessionManager |
getSessionManager()
Returns the session manager defined by this SSLContext. |
TrustDecider |
getTrustDecider()
Deprecated. TrustDeciders should no longer be used. See ChainVerifier |
void |
setAllowedProtocolVersions(int minimumVersion,
int maximumVersion)
Set the SSL/TLS protocol versions to be accepted during the handshake. |
void |
setCacheTerminatedSessions(boolean value)
Sets whether or not to cache improperly terminated sessions. |
void |
setChainVerifier(ChainVerifier chainVerifier)
Set the ChainVerifier for this context. |
void |
setDebugStream(java.io.OutputStream out)
The default debug stream to use for all Transports created using this context. |
void |
setDebugStream(java.io.Writer out)
The default debug stream to use for all Transports created using this context. |
void |
setEnabledCipherSuiteList(CipherSuiteList enabledCipherSuites)
Sets the cipher suites which are enabled in this SSLContext. |
void |
setEnabledCipherSuites(CipherSuite[] enabledCipherSuites)
Sets the cipher suites which are enabled in this SSLContext. |
void |
setEnabledCompressionMethods(CompressionMethod[] enabledCompressionMethods)
Sets the compression methods which are enabled in this SSLContext. |
void |
setRandomGenerator(SecureRandom randomGenerator)
Sets the random number generator of this SSLContext. |
void |
setSessionManager(SessionManager sessionManager)
Sets the session manager defined by this SSLContext. |
void |
setTrustDecider(TrustDecider trustDecider)
Deprecated. TrustDeciders should no longer be used. See ChainVerifier |
java.lang.String |
toString()
Returns a string representation of this SSLContext. |
void |
updateCipherSuites()
Update the list of enabled ciphersuites to remove all not available using the current SecurityProvider. |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final double LIBRARY_VERSION
public static java.lang.String LIBRARY_VERSION_STRING
public static final int VERSION_NOT_CONNECTED
public static final int VERSION_SSL20
public static final int VERSION_SSL30
public static final int VERSION_TLS10
public static final int CERTTYPE_UNKNOWN
public static final int CERTTYPE_RSA_SIGN
public static final int CERTTYPE_DSS_SIGN
public static final int CERTTYPE_RSA_FIXED_DH
public static final int CERTTYPE_DSS_FIXED_DH
| Method Detail |
public void updateCipherSuites()
public ChainVerifier getChainVerifier()
public void setChainVerifier(ChainVerifier chainVerifier)
public void addTrustedCertificate(X509Certificate cert)
public SecureRandom getRandomGenerator()
public void setRandomGenerator(SecureRandom randomGenerator)
randomGenerator - the random number generator to usepublic SessionManager getSessionManager()
public void setSessionManager(SessionManager sessionManager)
sessionManager - the session manager defined by this SSLContextpublic CipherSuiteList getEnabledCipherSuiteList()
public void setEnabledCipherSuiteList(CipherSuiteList enabledCipherSuites)
enabledCipherSuites - the cipher suites which are enabled in this SSLContextpublic void setEnabledCipherSuites(CipherSuite[] enabledCipherSuites)
enabledCipherSuites - the cipher suites which are enabled in this SSLContextpublic CompressionMethod[] getEnabledCompressionMethods()
public void setEnabledCompressionMethods(CompressionMethod[] enabledCompressionMethods)
enabledCompressionMethods - the compression methods which
are enabled in this SSLContextpublic boolean getCacheTerminatedSessions()
public void setCacheTerminatedSessions(boolean value)
public void setAllowedProtocolVersions(int minimumVersion,
int maximumVersion)
The parameters passed should be from the VERSION_xxx list defined in this class. Per default both SSLv3 and TLS are enabled, SSLv2 is disabled.
If you want to enable e.g. SSLv2, SSLv3, and TLS use
setAllowedProtocolVersions(SSLContext.VERSION_SSL20, SSLContext.VERSION_TLS10);.
public int[] getAllowedProtocolVersions()
public void setDebugStream(java.io.OutputStream out)
SSLTransport.setDebugStream() method.public void setDebugStream(java.io.Writer out)
SSLTransport.setDebugStream() method.public java.io.PrintWriter getDebugStream()
public java.lang.String toString()
public abstract java.lang.Object clone()
public CipherSuite[] getEnabledCipherSuites()
public TrustDecider getTrustDecider()
public void setTrustDecider(TrustDecider trustDecider)
public static X509Certificate[] convertCertificateChain(Certificate[] certificateChain)
throws CertificateException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||