All Packages Class Hierarchy This Package Previous Next Index
Class iaik.security.ssl.SSLContext
java.lang.Object
|
+----iaik.security.ssl.SSLContext
- public class SSLContext
- extends Object
This class is used to manage all properties of a SSLSocket.
- See Also:
- CipherSuite, CompressionMethod, SessionManager, DefaultSessionManager, TrustDecider, DefaultTrustDecider
-
SSLContext()
- Create a default SSLContext.
-
getCertificateChain()
- Returns the certificate chain set through setCertificate().
-
getEnabledCipherSuites()
- Returns the cipher suites which are enabled in this SSLContext.
-
getEnabledCompressionMethods()
- Returns the compression methods which are enabled in this SSLContext.
-
getPrivateKey()
- Returns the private key set through setCertificate().
-
getRandomGenerator()
- Returns the random number generator currently used by this SSLContext.
-
getRequirePeerCertificate()
- Returns wheter a SSLSocket which uses this SSLContext requires a certificate
from the peer.
-
getSessionManager()
- Returns the session manager defined by this SSLContext.
-
getTempKeyPair()
- Returns the temporary key pair.
-
getTrustDecider()
- Returns the TrustDecider of this SSLContext.
-
setCertificate(X509Certificate[], PrivateKey)
- Set the certificate chain and the corresponding private key for a SSLSocket.
-
setEnabledCipherSuites(CipherSuite[])
- Sets the cipher suites which are enabled in this SSLContext.
-
setEnabledCompressionMethods(CompressionMethod[])
- Sets the compression methods which are enabled in this SSLContext.
-
setRandomGenerator(SecureRandom)
- Sets the random number generator of this SSLContext.
-
setRequirePeerCertificate(boolean)
- This method is used to switch on client authentication
-
setSessionManager(SessionManager)
- Sets the session manager defined by this SSLContext.
-
setTempKeyPair(KeyPair)
- Sets the temporary key pair.
-
setTrustDecider(TrustDecider)
- Sets the TrustDecider of this SSLContext.
-
toString()
- Returns a string representation of this SSLContext.
SSLContext
public SSLContext()
- Create a default SSLContext.
setCertificate
public void setCertificate(X509Certificate certificateChain[],
PrivateKey privateKey)
- Set the certificate chain and the corresponding private key for a SSLSocket.
It is also possible to set only one parameter. Just set the other to
null.
- Parameters:
- certificateChain - a sequence of X.509v3 certificates
- privateKey - the private key for the sender's certificate
getCertificateChain
public X509Certificate[] getCertificateChain()
- Returns the certificate chain set through setCertificate().
- Returns:
- the certificate chain set through setCertificate()
getPrivateKey
public PrivateKey getPrivateKey()
- Returns the private key set through setCertificate().
- Returns:
- the private key set through setCertificate()
getTempKeyPair
public KeyPair getTempKeyPair()
- Returns the temporary key pair.
- Returns:
- the temporary key pair
setTempKeyPair
public void setTempKeyPair(KeyPair tempKeyPair)
- Sets the temporary key pair.
- Parameters:
- tempKeyPair - the temporary key pair
getRandomGenerator
public SecureRandom getRandomGenerator()
- Returns the random number generator currently used by this SSLContext.
- Returns:
- the random number generator currently used by this SSLContext
setRandomGenerator
public void setRandomGenerator(SecureRandom randomGenerator)
- Sets the random number generator of this SSLContext.
- Parameters:
- randomGenerator - the random number generator to use
getSessionManager
public SessionManager getSessionManager()
- Returns the session manager defined by this SSLContext.
- Returns:
- the session manager defined by this SSLContext
setSessionManager
public void setSessionManager(SessionManager sessionManager)
- Sets the session manager defined by this SSLContext.
- Parameters:
- sessionManager - the session manager defined by this SSLContext
getEnabledCipherSuites
public CipherSuite[] getEnabledCipherSuites()
- Returns the cipher suites which are enabled in this SSLContext.
- Returns:
- the cipher suites which are enabled in this SSLContext
setEnabledCipherSuites
public void setEnabledCipherSuites(CipherSuite enabledCipherSuites[])
- Sets the cipher suites which are enabled in this SSLContext.
- Parameters:
- enabledCipherSuites - the cipher suites which are enabled in this SSLContext
getEnabledCompressionMethods
public CompressionMethod[] getEnabledCompressionMethods()
- Returns the compression methods which are enabled in this SSLContext.
- Returns:
- the compression methods which are enabled in this SSLContext
setEnabledCompressionMethods
public void setEnabledCompressionMethods(CompressionMethod enabledCompressionMethods[])
- Sets the compression methods which are enabled in this SSLContext.
- Parameters:
- enabledCompressionMethods - the compression methods which
are enabled in this SSLContext
getTrustDecider
public TrustDecider getTrustDecider()
- Returns the TrustDecider of this SSLContext.
- Returns:
- the TrustDecider of this SSLContext
setTrustDecider
public void setTrustDecider(TrustDecider trustDecider)
- Sets the TrustDecider of this SSLContext.
- Parameters:
- trustDecider - the TrustDecider of this SSLContext
getRequirePeerCertificate
public boolean getRequirePeerCertificate()
- Returns wheter a SSLSocket which uses this SSLContext requires a certificate
from the peer.
- Returns:
- true, if a peer certificate is required
setRequirePeerCertificate
public void setRequirePeerCertificate(boolean require)
- This method is used to switch on client authentication
- Parameters:
- require - true, if a peer certificate is required
toString
public String toString()
- Returns a string representation of this SSLContext.
- Returns:
- a string representation
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index