Package com.yahoo.security
Class SslContextBuilder
java.lang.Object
com.yahoo.security.SslContextBuilder
A builder for
SSLContext.- Author:
- bjorncs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA factory interface for creatingX509ExtendedKeyManager.static interfaceA factory interface for creatingX509ExtendedTrustManager. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()withKeyManager(X509ExtendedKeyManager keyManager) Note: Callee is responsible for configuring the key manager.withKeyManagerFactory(SslContextBuilder.KeyManagerFactory keyManagerFactory) withKeyStore(Path file, char[] password, KeyStoreType keyStoreType) withKeyStore(Path privateKeyPemFile, Path certificatesPemFile) withKeyStore(KeyStore keyStore, char[] password) withKeyStore(PrivateKey privateKey, X509Certificate certificate) withKeyStore(PrivateKey privateKey, List<X509Certificate> certificates) withKeyStore(List<X509CertificateWithKey> clientCertificatesAndKeys) withTrustManager(X509ExtendedTrustManager trustManager) Note: Callee is responsible for configuring the trust manager.withTrustManagerFactory(SslContextBuilder.TrustManagerFactory trustManagersFactory) withTrustStore(Path pemEncodedCaCertificates) withTrustStore(Path file, KeyStoreType trustStoreType) withTrustStore(X509Certificate caCertificate) withTrustStore(KeyStore trustStore) withTrustStore(List<X509Certificate> caCertificates)
-
Constructor Details
-
SslContextBuilder
public SslContextBuilder()
-
-
Method Details
-
withTrustStore
-
withTrustStore
-
withTrustStore
-
withTrustStore
-
withTrustStore
-
withKeyStore
-
withKeyStore
-
withKeyStore
-
withKeyStore
-
withKeyStore
-
withKeyStore
-
withTrustManagerFactory
public SslContextBuilder withTrustManagerFactory(SslContextBuilder.TrustManagerFactory trustManagersFactory) -
withKeyManagerFactory
public SslContextBuilder withKeyManagerFactory(SslContextBuilder.KeyManagerFactory keyManagerFactory) -
withKeyManager
Note: Callee is responsible for configuring the key manager. Any keystore configured bywithKeyStore(KeyStore, char[])or the other overloads will be ignored. -
withTrustManager
Note: Callee is responsible for configuring the trust manager. Any truststore configured bywithTrustStore(KeyStore)or the other overloads will be ignored. -
build
-
buildContext
- Returns:
- same
build()but includes theSSLContextinstance's associated trust/key managers
-