public class X509TrustManagerBuilder
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
X509TrustManagerBuilder() |
Modifier and Type | Method and Description |
---|---|
protected void |
add(javax.net.ssl.X509TrustManager trustManager)
Adds the given trust manager if it is not null and not yet contained.
|
X509TrustManagerBuilder |
addDefaultTrustStore()
Add the JRE/JDK default trust store.
|
X509TrustManagerBuilder |
addTrustStore(java.io.InputStream trustStore,
java.lang.String password)
Add the given trust store.
|
X509TrustManagerBuilder |
addTrustStore(java.lang.String fileName,
java.lang.String password)
Add the given trust store.
|
MultiX509TrustManager |
build() |
static X509TrustManagerBuilder |
create()
Create a new builder.
|
protected javax.net.ssl.X509TrustManager |
findDefaultTrustManager(java.security.KeyStore keyStore) |
protected javax.net.ssl.X509TrustManager |
getJreTrustManager() |
protected java.util.List<javax.net.ssl.X509TrustManager> |
getTrustManagers() |
public static X509TrustManagerBuilder create()
SecurityRuntimeException
- if initialization with default JRE trust store fails.public X509TrustManagerBuilder addDefaultTrustStore()
public X509TrustManagerBuilder addTrustStore(java.lang.String fileName, java.lang.String password)
fileName
- The path/name of the keystore file (must not be null).password
- The password to unlock the keystore file.public X509TrustManagerBuilder addTrustStore(java.io.InputStream trustStore, java.lang.String password)
trustStore
- The truststore file stream (must not be null).password
- The password to unlock the truststore file.public MultiX509TrustManager build()
protected void add(javax.net.ssl.X509TrustManager trustManager)
protected javax.net.ssl.X509TrustManager findDefaultTrustManager(java.security.KeyStore keyStore)
protected javax.net.ssl.X509TrustManager getJreTrustManager()
protected java.util.List<javax.net.ssl.X509TrustManager> getTrustManagers()