|
||||||||||
| 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
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| 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 | |
SSLClientContext()
Create a default SSLContext. |
|
SSLClientContext(SecureRandom random)
Create a default SSLContext with a specific random number generator. |
|
SSLClientContext(SSLClientContext other)
Create an SSLClientContext cloning another context. |
|
| Method Summary | |
void |
addClientCredentials(KeyAndCert keyAndCert)
Add some client credentials. |
void |
addClientCredentials(X509Certificate[] chain,
PrivateKey key)
Add some client credentials. |
void |
clearClientCredentials()
Clear the database of client credentials. |
java.lang.Object |
clone()
Implements the Cloneable interface. |
protected KeyAndCert[] |
getClientCredentials(Principal[] issuers,
byte[] certificateTypes)
Return all matching client credentials. |
void |
setCheckExportRestrictions(boolean check)
Set the export restriction check. |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public SSLClientContext()
public SSLClientContext(SecureRandom random)
random - the random number generator to use or null for the default SecureRandompublic SSLClientContext(SSLClientContext other)
| Method Detail |
public java.lang.Object clone()
public void setCheckExportRestrictions(boolean check)
public void addClientCredentials(X509Certificate[] chain,
PrivateKey key)
public void addClientCredentials(KeyAndCert keyAndCert)
throws java.lang.IllegalArgumentException
public void clearClientCredentials()
protected KeyAndCert[] getClientCredentials(Principal[] issuers,
byte[] certificateTypes)
This method returns all appropriate credentials or the empty array if no are available. An application may override this method to display a dialog window etc. to the user to allow him select the credentials to use if multiple are available. The library will always use the credentials at index 0 in the returned array. An overridden method may look like this:
protected KeyAndCert[] getClientCredentials(Principal[] issuers, byte[] certificateTypes) {
KeyAndCert[] certs = super.getClientCredentials(issuers, certificateType);
// allow user to select a certificate or cancel
if( selected == -1 ) {
return new KeyAndCert[0];
} else {
return new KeyAndCert[] { certs[selected] };
}
}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||