|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--iaik.security.ssl.SSLContext
|
+--iaik.security.ssl.SSLClientContext
|
+--iaik.security.ssl.SSLServerContext
This class extends the SSLContext to add client related information to an SSL/TLS policy.
Note that there is a separate document about the iSaSiLk authentication framework, see your installation directory.
SSLContext| Field Summary | |
static CipherSuite[] |
anon
Deprecated. use CipherSuite.CS_DH_ANON instead |
static CipherSuite[] |
dh_dss
Deprecated. use CipherSuite.CS_DH_DSS instead |
static CipherSuite[] |
dh_rsa
Deprecated. use CipherSuite.CS_DH_RSA instead |
static CipherSuite[] |
dhe_dss
Deprecated. use CipherSuite.CS_DHE_DSS instead |
static CipherSuite[] |
dhe_rsa
Deprecated. use CipherSuite.CS_DHE_RSA instead |
static CipherSuite[] |
rsa
Deprecated. use CipherSuite.CS_RSA instead |
static CipherSuite[] |
rsa_export
Deprecated. use CipherSuite.CS_RSA_EXPORT instead |
| Fields inherited from class iaik.security.ssl.SSLContext |
CERTTYPE_DSS_FIXED_DH,
CERTTYPE_DSS_SIGN,
CERTTYPE_RSA_FIXED_DH,
CERTTYPE_RSA_SIGN,
CERTTYPE_UNKNOWN,
LIBRARY_VERSION,
LIBRARY_VERSION_STRING,
VERSION_NOT_CONNECTED,
VERSION_SSL20,
VERSION_SSL30,
VERSION_TLS10 |
| Constructor Summary | |
SSLServerContext()
Create a default SSLServerContext. |
|
SSLServerContext(SecureRandom random)
Create a default SSLServerContext with a specific random number generator. |
|
SSLServerContext(SSLServerContext other)
Create an SSLServerContext cloning another context. |
|
| Method Summary | |
void |
addServerCredentials(KeyAndCert keyAndCert)
Add some server credentials. |
void |
addServerCredentials(X509Certificate[] chain,
PrivateKey key)
Add some server credentials. |
void |
addTemporaryParameter(DHParameterSpec spec)
Add temporary Diffie-Hellman parameters. |
void |
addTemporaryParameter(KeyPair keyPair)
Add a temporary RSA KeyPair. |
void |
clearServerCredentials()
Clear the server credentials database. |
java.lang.Object |
clone()
Implements the Cloneable interface. |
int[] |
getAllowedCertificateTypes()
Get the certificate types to allow for client authentication. |
boolean |
getRequestClientCertificate()
Returns wheter a SSLSocket which uses this SSLContext requests a certificate from the client. |
boolean |
getRequireClientCertificate()
Deprecated. use getRequestClientCertificate() instead |
KeyAndCert |
getServerCredentials(int certType)
Get the server credentials of a particular type. |
void |
setAllowedCertificateTypes(int[] types)
Set the certificate types to allow for client authentication. |
void |
setAllowedProtocolVersions(int minimumVersion,
int maximumVersion)
Set the SSL/TLS protocol versions to be accepted during the handshake. |
void |
setDHCertificate(Certificate[] certificateChain,
PrivateKey privateKey)
Deprecated. use addServerCredentials() instead |
void |
setDHParameter(DHParameterSpec dhParameter)
Deprecated. use addTemporaryParameter() instead |
void |
setDSACertificate(Certificate[] certificateChain,
PrivateKey privateKey)
Deprecated. use addServerCredentials() instead |
void |
setRequestClientCertificate(boolean value)
Set whether or not to request client authentication during the handshake. |
void |
setRequireClientCertificate(byte[] certificateTypes,
Principal[] certificateAuthorities)
Deprecated. use setRequestClientCertificate() instead |
void |
setRSACertificate(Certificate[] certificateChain,
PrivateKey privateKey)
Deprecated. use addServerCredentials() instead |
void |
setRSATempKeyPair(KeyPair tempKeyPair)
Deprecated. use addTemporaryParameter() instead |
java.lang.String |
toString()
Returns a string representation of this SSLContext. |
void |
updateCipherSuites()
Update the list of currently enabled ciphersuites based on the certificates available. |
| Methods inherited from class iaik.security.ssl.SSLClientContext |
addClientCredentials,
addClientCredentials,
clearClientCredentials,
getClientCredentials,
setCheckExportRestrictions |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final CipherSuite[] rsa
public static final CipherSuite[] rsa_export
public static final CipherSuite[] dhe_rsa
public static final CipherSuite[] dhe_dss
public static final CipherSuite[] dh_rsa
public static final CipherSuite[] dh_dss
public static final CipherSuite[] anon
| Constructor Detail |
public SSLServerContext()
public SSLServerContext(SecureRandom random)
public SSLServerContext(SSLServerContext other)
| Method Detail |
public int[] getAllowedCertificateTypes()
public void setAllowedCertificateTypes(int[] types)
public void clearServerCredentials()
public void addServerCredentials(X509Certificate[] chain,
PrivateKey key)
public void addServerCredentials(KeyAndCert keyAndCert)
public KeyAndCert getServerCredentials(int certType)
public void updateCipherSuites()
Note that the semantics of this method were changed in 3.0. Previously this method would enable all ciphersuites that were available, now all currently enabled ciphersuites that are not available are disabled.
public void addTemporaryParameter(KeyPair keyPair)
public void addTemporaryParameter(DHParameterSpec spec)
public void setRequestClientCertificate(boolean value)
ChainVerifierpublic boolean getRequestClientCertificate()
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 java.lang.Object clone()
public java.lang.String toString()
public void setRequireClientCertificate(byte[] certificateTypes,
Principal[] certificateAuthorities)
public void setRSACertificate(Certificate[] certificateChain,
PrivateKey privateKey)
throws CertificateException
public void setDSACertificate(Certificate[] certificateChain,
PrivateKey privateKey)
throws CertificateException
public void setDHCertificate(Certificate[] certificateChain,
PrivateKey privateKey)
throws CertificateException
public void setDHParameter(DHParameterSpec dhParameter)
public void setRSATempKeyPair(KeyPair tempKeyPair)
public boolean getRequireClientCertificate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||