|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.nikhef.slcshttps.crypto.CryptoSSL
public class CryptoSSL
The main task of this class is to provide a SSLSocketFactory
for a
given CryptoStore
containing a client certificate and corresponding
private key, this is the input needed for setting up Client Side
authentication during SSL setup.
Field Summary | |
---|---|
private KeyManager[] |
keyManagers
Contains the KeyManager s to be used for client side
authentication. |
private TrustManager[] |
trustManagers
Contains the TrustManager s which provide authentication of
server side. |
Constructor Summary | |
---|---|
CryptoSSL(CryptoStore cryptoStore)
constructs a new CryptoSSL , initializing
the keyManagers field using the given CryptoStore , while
using the default TrustManager . |
|
CryptoSSL(CryptoStore cryptoStore,
TrustManager trustManager)
constructs a new CryptoSSL , initializing
the keyManagers field using the given CryptoStore ,
parameter and the trustManagers field using the given
TrustManager . |
Method Summary | |
---|---|
void |
addCryptoStore(CryptoStore cryptoStore)
Adds an extra KeyManager for the given CryptoStore
parameter. |
SSLSocketFactory |
getSSLSocketFactory()
Creates a SSLSocketFactory , which provides both key and trust
material during the setting up of an SSL session. |
void |
init(CryptoStore cryptoStore)
initializes the keyManagers field using the give CryptoStore and the trustManagers field to use the default
TrustManager . |
void |
init(CryptoStore cryptoStore,
TrustManager trustManager)
initializes the keyManagers and trustManagers fields
using the given CryptoStore and TrustManager parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private KeyManager[] keyManagers
KeyManager
s to be used for client side
authentication.
private TrustManager[] trustManagers
TrustManager
s which provide authentication of
server side.
Constructor Detail |
---|
public CryptoSSL(CryptoStore cryptoStore) throws KeyStoreException
CryptoSSL
, initializing
the keyManagers
field using the given CryptoStore
, while
using the default TrustManager
.
Initialization is done using init(CryptoStore)
, so we can
reinitialize the class.
cryptoStore
- CryptoStore
to get the KeyManager
[]
from.
KeyStoreException
CryptoSSL(CryptoStore,TrustManager)
,
init(CryptoStore)
public CryptoSSL(CryptoStore cryptoStore, TrustManager trustManager) throws KeyStoreException
CryptoSSL
, initializing
the keyManagers
field using the given CryptoStore
,
parameter and the trustManagers
field using the given
TrustManager
.
Initialization is done using #init(CryptoStore,TrustManager)}, so we can
reinitialize the class.
cryptoStore
- CryptoStore
to get the KeyManager
[]
from.trustManager
- TrustManager
to use for server certificate
checking. Use null
for the default.
KeyStoreException
init(CryptoStore,TrustManager)
Method Detail |
---|
public void init(CryptoStore cryptoStore) throws KeyStoreException
keyManagers
field using the give CryptoStore
and the trustManagers
field to use the default
TrustManager
.
cryptoStore
- CryptoStore
to get the KeyManager
[]
from.
KeyStoreException
init(CryptoStore,TrustManager)
public void init(CryptoStore cryptoStore, TrustManager trustManager) throws KeyStoreException
keyManagers
and trustManagers
fields
using the given CryptoStore
and TrustManager
parameters.
cryptoStore
- CryptoStore
to get the KeyManager
[]
from.trustManager
- TrustManager
to use for server
certificate checking. Use null
for the default.
KeyStoreException
public void addCryptoStore(CryptoStore cryptoStore) throws KeyStoreException
KeyManager
for the given CryptoStore
parameter. Hence multiple client certificates can be offered when setting
up an SSL connection.
cryptoStore
- CryptoStore
to use to get an extra KeyManager
for client certificate checking from.
KeyStoreException
- when getting the KeyManagers
from
cryptoStore
failed.public SSLSocketFactory getSSLSocketFactory() throws KeyManagementException
SSLSocketFactory
, which provides both key and trust
material during the setting up of an SSL session. Key material is taken
from keyManagers
, trust material from trustManagers
s.
KeyManagementException
- in case of failure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
nl.nikhef.slcshttps | Mischa Sallé - msalle(AT)nikhef.nl |