public final class TrustManagerImpl extends Object implements X509TrustManager
X509TrustManager| Constructor and Description |
|---|
TrustManagerImpl(KeyStore keyStore)
Creates X509TrustManager based on a keystore
|
TrustManagerImpl(KeyStore keyStore,
CertPinManager manager)
For testing only
|
TrustManagerImpl(KeyStore keyStore,
CertPinManager manager,
TrustedCertificateStore certStore)
For testing only.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] chain,
String authType)
Checks whether the specified certificate chain (partial or complete) can
be validated and is trusted for client authentication for the specified
authentication type.
|
void |
checkServerTrusted(X509Certificate[] chain,
String authType)
Checks whether the specified certificate chain (partial or complete) can
be validated and is trusted for server authentication for the specified
key exchange algorithm.
|
List<X509Certificate> |
checkServerTrusted(X509Certificate[] chain,
String authType,
SSLSession session)
Validates whether a server is trusted.
|
List<X509Certificate> |
checkServerTrusted(X509Certificate[] chain,
String authType,
String host)
Validates whether a server is trusted.
|
X509Certificate[] |
getAcceptedIssuers()
Returns the list of certificate issuer authorities which are trusted for
authentication of peers.
|
void |
handleTrustStorageUpdate() |
boolean |
isUserAddedCertificate(X509Certificate cert) |
public TrustManagerImpl(KeyStore keyStore)
keyStore - public TrustManagerImpl(KeyStore keyStore, CertPinManager manager)
public TrustManagerImpl(KeyStore keyStore, CertPinManager manager, TrustedCertificateStore certStore)
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
X509TrustManagercheckClientTrusted in interface X509TrustManagerchain - the certificate chain to validate.authType - the authentication type used.CertificateException - if the certificate chain can't be validated or isn't trusted.public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
X509TrustManagercheckServerTrusted in interface X509TrustManagerchain - the certificate chain to validate.authType - the key exchange algorithm name.CertificateException - if the certificate chain can't be validated or isn't trusted.public List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType, String host) throws CertificateException
CertificateExceptionpublic boolean isUserAddedCertificate(X509Certificate cert)
public List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType, SSLSession session) throws CertificateException
CertificateExceptionpublic void handleTrustStorageUpdate()
public X509Certificate[] getAcceptedIssuers()
X509TrustManagergetAcceptedIssuers in interface X509TrustManager