Package nl.altindag.ssl
Class SSLFactory.Builder
java.lang.Object
nl.altindag.ssl.SSLFactory.Builder
- Enclosing class:
- SSLFactory
-
Method Summary
Modifier and TypeMethodDescriptionbuild()withCiphers(String... ciphers) withExcludedCiphers(String... ciphers) withExcludedProtocols(String... protocols) <T extends HostnameVerifier>
SSLFactory.BuilderwithHostnameVerifier(T hostnameVerifier) withHostnameVerifierEnhancer(Predicate<HostnameVerifierParameters> hostnameVerifierParametersValidator) withIdentityMaterial(InputStream identityStream, char[] identityStorePassword) withIdentityMaterial(InputStream identityStream, char[] identityStorePassword, char[] identityPassword) withIdentityMaterial(InputStream identityStream, char[] identityStorePassword, char[] identityPassword, String identityStoreType) withIdentityMaterial(InputStream identityStream, char[] identityStorePassword, String identityStoreType) withIdentityMaterial(String identityStorePath, char[] identityStorePassword) withIdentityMaterial(String identityStorePath, char[] identityStorePassword, char[] identityPassword) withIdentityMaterial(String identityStorePath, char[] identityStorePassword, char[] identityPassword, String identityStoreType) withIdentityMaterial(String identityStorePath, char[] identityStorePassword, String identityStoreType) withIdentityMaterial(Path identityStorePath, char[] identityStorePassword) withIdentityMaterial(Path identityStorePath, char[] identityStorePassword, char[] identityPassword) withIdentityMaterial(Path identityStorePath, char[] identityStorePassword, char[] identityPassword, String identityStoreType) withIdentityMaterial(Path identityStorePath, char[] identityStorePassword, String identityStoreType) final <T extends Certificate>
SSLFactory.BuilderwithIdentityMaterial(Key privateKey, char[] privateKeyPassword, String alias, List<T> certificateChain) final <T extends Certificate>
SSLFactory.BuilderwithIdentityMaterial(Key privateKey, char[] privateKeyPassword, String alias, T... certificateChain) final <T extends Certificate>
SSLFactory.BuilderwithIdentityMaterial(Key privateKey, char[] privateKeyPassword, List<T> certificateChain) final <T extends Certificate>
SSLFactory.BuilderwithIdentityMaterial(Key privateKey, char[] privateKeyPassword, T... certificateChain) withIdentityMaterial(KeyStore identityStore, char[] identityPassword) <T extends X509KeyManager>
SSLFactory.BuilderwithIdentityMaterial(T keyManager) withIdentityRoute(String alias, String... hosts) withIdentityRoute(Map<String, List<String>> aliasesToHosts) withInflatableTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType, BiPredicate<X509Certificate[], String> certificateAndAuthTypeTrustPredicate) Deprecated.withInflatableTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType, Predicate<TrustManagerParameters> trustManagerParametersPredicate) withNeedClientAuthentication(boolean needClientAuthentication) withProtocols(String... protocols) <T extends SecureRandom>
SSLFactory.BuilderwithSecureRandom(T secureRandom) withSecurityProvider(String securityProviderName) <T extends Provider>
SSLFactory.BuilderwithSecurityProvider(T securityProvider) withSessionCacheSize(int cacheSizeInBytes) withSessionTimeout(int timeoutInSeconds) withSslContextAlgorithm(String sslContextAlgorithm) Enables the possibility to swap the underlying KeyManager at runtime.Enables the possibility to swap the underlying TrustManager at runtime.withTrustEnhancer(Predicate<TrustManagerParameters> validator) withTrustEnhancer(ChainAndAuthTypeValidator validator) Deprecated.Deprecated.Deprecated.withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword) withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword, String trustStoreType) withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword, String trustStoreType, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) withTrustMaterial(String trustStorePath, char[] trustStorePassword) withTrustMaterial(String trustStorePath, char[] trustStorePassword, String trustStoreType) withTrustMaterial(String trustStorePath, char[] trustStorePassword, String trustStoreType, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) withTrustMaterial(String trustStorePath, char[] trustStorePassword, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) withTrustMaterial(Path trustStorePath, char[] trustStorePassword) withTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType) withTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) withTrustMaterial(Path trustStorePath, char[] trustStorePassword, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) withTrustMaterial(KeyStore trustStore) withTrustMaterial(KeyStore trustStore, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) <T extends Certificate>
SSLFactory.BuilderwithTrustMaterial(List<T> certificates) <T extends Certificate>
SSLFactory.BuilderwithTrustMaterial(List<T> certificates, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) withTrustMaterial(Set<X509Certificate> certificates, TrustAnchorTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) <T extends X509TrustManager>
SSLFactory.BuilderwithTrustMaterial(T trustManager) final <T extends Certificate>
SSLFactory.BuilderwithTrustMaterial(T... certificates) final <T extends Certificate>
SSLFactory.BuilderwithTrustMaterial(T[] certificates, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) <T extends X509TrustManager>
SSLFactory.BuilderwithTrustMaterial(T trustManager, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) A shorter method for using the unsafe trust materialwithWantClientAuthentication(boolean wantClientAuthentication)
-
Method Details
-
withSystemTrustMaterial
-
withDefaultTrustMaterial
-
withSystemPropertyDerivedTrustMaterial
-
withUnsafeTrustMaterial
A shorter method for using the unsafe trust material- Returns:
SSLFactory.Builder- See Also:
-
withDummyTrustMaterial
-
withSwappableTrustMaterial
Enables the possibility to swap the underlying TrustManager at runtime. After this option has been enabled the TrustManager can be swapped withTrustManagerUtils#swapTrustManager(swappableTrustManager, newTrustManager)- Returns:
SSLFactory.Builder
-
withLoggingTrustMaterial
-
withTrustMaterial
-
withTrustMaterial
public <T extends ManagerFactoryParameters> SSLFactory.Builder withTrustMaterial(T managerFactoryParameters) -
withTrustMaterial
public <T extends X509TrustManager> SSLFactory.Builder withTrustMaterial(T trustManager, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
-
withTrustMaterial
-
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(String trustStorePath, char[] trustStorePassword, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(String trustStorePath, char[] trustStorePassword, String trustStoreType) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(String trustStorePath, char[] trustStorePassword, String trustStoreType, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
-
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(Path trustStorePath, char[] trustStorePassword, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword, String trustStoreType) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(InputStream trustStoreStream, char[] trustStorePassword, String trustStoreType, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
-
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(KeyStore trustStore, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
public SSLFactory.Builder withTrustMaterial(Set<X509Certificate> certificates, TrustAnchorTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
@SafeVarargs public final <T extends Certificate> SSLFactory.Builder withTrustMaterial(T... certificates) -
withTrustMaterial
public final <T extends Certificate> SSLFactory.Builder withTrustMaterial(T[] certificates, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withTrustMaterial
-
withTrustMaterial
public <T extends Certificate> SSLFactory.Builder withTrustMaterial(List<T> certificates, TrustStoreTrustOptions<? extends CertPathTrustManagerParameters> trustOptions) -
withSystemPropertyDerivedIdentityMaterial
-
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(String identityStorePath, char[] identityStorePassword) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(String identityStorePath, char[] identityStorePassword, char[] identityPassword) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(String identityStorePath, char[] identityStorePassword, String identityStoreType) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(String identityStorePath, char[] identityStorePassword, char[] identityPassword, String identityStoreType) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(Path identityStorePath, char[] identityStorePassword) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(Path identityStorePath, char[] identityStorePassword, char[] identityPassword) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(Path identityStorePath, char[] identityStorePassword, String identityStoreType) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(Path identityStorePath, char[] identityStorePassword, char[] identityPassword, String identityStoreType) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(InputStream identityStream, char[] identityStorePassword) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(InputStream identityStream, char[] identityStorePassword, char[] identityPassword) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(InputStream identityStream, char[] identityStorePassword, String identityStoreType) -
withIdentityMaterial
public SSLFactory.Builder withIdentityMaterial(InputStream identityStream, char[] identityStorePassword, char[] identityPassword, String identityStoreType) -
withIdentityMaterial
-
withIdentityMaterial
@SafeVarargs public final <T extends Certificate> SSLFactory.Builder withIdentityMaterial(Key privateKey, char[] privateKeyPassword, T... certificateChain) -
withIdentityMaterial
@SafeVarargs public final <T extends Certificate> SSLFactory.Builder withIdentityMaterial(Key privateKey, char[] privateKeyPassword, String alias, T... certificateChain) -
withIdentityMaterial
public final <T extends Certificate> SSLFactory.Builder withIdentityMaterial(Key privateKey, char[] privateKeyPassword, List<T> certificateChain) -
withIdentityMaterial
public final <T extends Certificate> SSLFactory.Builder withIdentityMaterial(Key privateKey, char[] privateKeyPassword, String alias, List<T> certificateChain) -
withIdentityMaterial
-
withIdentityMaterial
-
withDummyIdentityMaterial
-
withSwappableIdentityMaterial
Enables the possibility to swap the underlying KeyManager at runtime. After this option has been enabled the KeyManager can be swapped withKeyManagerUtils#swapKeyManager(swappableKeyManager, newKeyManager)- Returns:
SSLFactory.Builder
-
withLoggingIdentityMaterial
-
withInflatableTrustMaterial
-
withInflatableTrustMaterial
@Deprecated public SSLFactory.Builder withInflatableTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType, BiPredicate<X509Certificate[], String> certificateAndAuthTypeTrustPredicate) Deprecated. -
withInflatableTrustMaterial
public SSLFactory.Builder withInflatableTrustMaterial(Path trustStorePath, char[] trustStorePassword, String trustStoreType, Predicate<TrustManagerParameters> trustManagerParametersPredicate) -
withIdentityRoute
-
withIdentityRoute
-
withHostnameVerifier
-
withUnsafeHostnameVerifier
-
withHostnameVerifierEnhancer
public SSLFactory.Builder withHostnameVerifierEnhancer(Predicate<HostnameVerifierParameters> hostnameVerifierParametersValidator) -
withCiphers
-
withExcludedCiphers
-
withSystemPropertyDerivedCiphers
-
withProtocols
-
withExcludedProtocols
-
withSystemPropertyDerivedProtocols
-
withNeedClientAuthentication
-
withNeedClientAuthentication
-
withWantClientAuthentication
-
withWantClientAuthentication
-
withSessionTimeout
-
withSessionCacheSize
-
withSslContextAlgorithm
-
withSecurityProvider
-
withSecurityProvider
-
withSecureRandom
-
withTrustingAllCertificatesWithoutValidation
-
withTrustEnhancer
Deprecated. -
withTrustEnhancer
@Deprecated public SSLFactory.Builder withTrustEnhancer(ChainAndAuthTypeWithSocketValidator validator) Deprecated. -
withTrustEnhancer
@Deprecated public SSLFactory.Builder withTrustEnhancer(ChainAndAuthTypeWithSSLEngineValidator validator) Deprecated. -
withTrustEnhancer
-
withConcealedTrustMaterial
-
build
-