org.apache.http.conn.ssl
Class SSLContextBuilder
java.lang.Object
org.apache.http.conn.ssl.SSLContextBuilder
@NotThreadSafe
public class SSLContextBuilder
- extends java.lang.Object
Builder for SSLContext instances.
- Since:
- 4.3
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSLContextBuilder
public SSLContextBuilder()
useTLS
public SSLContextBuilder useTLS()
useSSL
public SSLContextBuilder useSSL()
useProtocol
public SSLContextBuilder useProtocol(java.lang.String protocol)
setSecureRandom
public SSLContextBuilder setSecureRandom(java.security.SecureRandom secureRandom)
loadTrustMaterial
public SSLContextBuilder loadTrustMaterial(java.security.KeyStore truststore,
TrustStrategy trustStrategy)
throws java.security.NoSuchAlgorithmException,
java.security.KeyStoreException
- Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
loadTrustMaterial
public SSLContextBuilder loadTrustMaterial(java.security.KeyStore truststore)
throws java.security.NoSuchAlgorithmException,
java.security.KeyStoreException
- Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
loadKeyMaterial
public SSLContextBuilder loadKeyMaterial(java.security.KeyStore keystore,
char[] keyPassword)
throws java.security.NoSuchAlgorithmException,
java.security.KeyStoreException,
java.security.UnrecoverableKeyException
- Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.UnrecoverableKeyException
loadKeyMaterial
public SSLContextBuilder loadKeyMaterial(java.security.KeyStore keystore,
char[] keyPassword,
PrivateKeyStrategy aliasStrategy)
throws java.security.NoSuchAlgorithmException,
java.security.KeyStoreException,
java.security.UnrecoverableKeyException
- Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.UnrecoverableKeyException
build
public javax.net.ssl.SSLContext build()
throws java.security.NoSuchAlgorithmException,
java.security.KeyManagementException
- Throws:
java.security.NoSuchAlgorithmException
java.security.KeyManagementException