|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.ssl.SSLContextBuilder
public class SSLContextBuilder
Builder for 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
TODO Specify which Oracle JSSE versions the above has been verified.
Constructor Summary | |
---|---|
SSLContextBuilder()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SSLContextBuilder()
Method Detail |
---|
public static SSLContextBuilder create()
@Deprecated public SSLContextBuilder useProtocol(String protocol)
setProtocol(String)
.
protocol
- the SSLContext protocol algorithm name of the requested protocol. See
the SSLContext section in the Java
Cryptography Architecture Standard Algorithm Name
Documentation for more information.
public SSLContextBuilder setProtocol(String protocol)
protocol
- the SSLContext protocol algorithm name of the requested protocol. See
the SSLContext section in the Java
Cryptography Architecture Standard Algorithm Name
Documentation for more information.
public SSLContextBuilder setSecureRandom(SecureRandom secureRandom)
public SSLContextBuilder setProvider(Provider provider)
public SSLContextBuilder setProvider(String name)
public SSLContextBuilder setKeyStoreType(String keyStoreType)
keyStoreType
- the SSLkey store type. See
the KeyStore section in the Java
Cryptography Architecture Standard Algorithm Name
Documentation for more information.
public SSLContextBuilder setKeyManagerFactoryAlgorithm(String keyManagerFactoryAlgorithm)
keyManagerFactoryAlgorithm
- the key manager factory algorithm name of the requested protocol. See
the KeyManagerFactory section in the Java
Cryptography Architecture Standard Algorithm Name
Documentation for more information.
public SSLContextBuilder setTrustManagerFactoryAlgorithm(String trustManagerFactoryAlgorithm)
trustManagerFactoryAlgorithm
- the trust manager algorithm name of the requested protocol. See
the TrustManagerFactory section in the Java
Cryptography Architecture Standard Algorithm Name
Documentation for more information.
public SSLContextBuilder loadTrustMaterial(KeyStore truststore, TrustStrategy trustStrategy) throws NoSuchAlgorithmException, KeyStoreException
NoSuchAlgorithmException
KeyStoreException
public SSLContextBuilder loadTrustMaterial(TrustStrategy trustStrategy) throws NoSuchAlgorithmException, KeyStoreException
NoSuchAlgorithmException
KeyStoreException
public SSLContextBuilder loadTrustMaterial(File file, char[] storePassword, TrustStrategy trustStrategy) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
CertificateException
IOException
public SSLContextBuilder loadTrustMaterial(File file, char[] storePassword) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
CertificateException
IOException
public SSLContextBuilder loadTrustMaterial(File file) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
CertificateException
IOException
public SSLContextBuilder loadTrustMaterial(URL url, char[] storePassword, TrustStrategy trustStrategy) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
CertificateException
IOException
public SSLContextBuilder loadTrustMaterial(URL url, char[] storePassword) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
CertificateException
IOException
public SSLContextBuilder loadKeyMaterial(KeyStore keystore, char[] keyPassword, PrivateKeyStrategy aliasStrategy) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException
public SSLContextBuilder loadKeyMaterial(KeyStore keystore, char[] keyPassword) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException
public SSLContextBuilder loadKeyMaterial(File file, char[] storePassword, char[] keyPassword, PrivateKeyStrategy aliasStrategy) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException
CertificateException
IOException
public SSLContextBuilder loadKeyMaterial(File file, char[] storePassword, char[] keyPassword) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException
CertificateException
IOException
public SSLContextBuilder loadKeyMaterial(URL url, char[] storePassword, char[] keyPassword, PrivateKeyStrategy aliasStrategy) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException
CertificateException
IOException
public SSLContextBuilder loadKeyMaterial(URL url, char[] storePassword, char[] keyPassword) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, CertificateException, IOException
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException
CertificateException
IOException
protected void initSSLContext(SSLContext sslContext, Collection<KeyManager> keyManagers, Collection<TrustManager> trustManagers, SecureRandom secureRandom) throws KeyManagementException
KeyManagementException
public SSLContext build() throws NoSuchAlgorithmException, KeyManagementException
NoSuchAlgorithmException
KeyManagementException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |