@NotThreadSafe public class SSLContextBuilder extends Object
SSLContext instances.
Please note: the default Oracle JSSE implementation of SSLContext.init(KeyManager[], TrustManager[], SecureRandom)
accepts multiple key and trust managers, however only only first matching type is ever used.
See for example:
SSLContext.html#init
| Constructor and Description |
|---|
SSLContextBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SSLContext |
build() |
SSLContextBuilder |
loadKeyMaterial(KeyStore keystore,
char[] keyPassword) |
SSLContextBuilder |
loadKeyMaterial(KeyStore keystore,
char[] keyPassword,
PrivateKeyStrategy aliasStrategy) |
SSLContextBuilder |
loadTrustMaterial(KeyStore truststore) |
SSLContextBuilder |
loadTrustMaterial(KeyStore truststore,
TrustStrategy trustStrategy) |
SSLContextBuilder |
setSecureRandom(SecureRandom secureRandom) |
SSLContextBuilder |
useProtocol(String protocol) |
SSLContextBuilder |
useSSL() |
SSLContextBuilder |
useTLS() |
public SSLContextBuilder useTLS()
public SSLContextBuilder useSSL()
public SSLContextBuilder useProtocol(String protocol)
public SSLContextBuilder setSecureRandom(SecureRandom secureRandom)
public SSLContextBuilder loadTrustMaterial(KeyStore truststore, TrustStrategy trustStrategy) throws NoSuchAlgorithmException, KeyStoreException
public SSLContextBuilder loadTrustMaterial(KeyStore truststore) throws NoSuchAlgorithmException, KeyStoreException
public SSLContextBuilder loadKeyMaterial(KeyStore keystore, char[] keyPassword) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException
public SSLContextBuilder loadKeyMaterial(KeyStore keystore, char[] keyPassword, PrivateKeyStrategy aliasStrategy) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException
public SSLContext build() throws NoSuchAlgorithmException, KeyManagementException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.