public class DefaultX509TrustManager extends X509ExtendedTrustManager
| Constructor and Description |
|---|
DefaultX509TrustManager(List<String> hosts)
Create a X509TrustManager that verifies the certificate chain and checks whether the cert matches
one of the given hosts in the list.
|
DefaultX509TrustManager(List<String> hosts,
KeyStore keyStore)
Create a X509TrustManager that verifies the certificate chain and checks whether the cert matches
one of the given hosts in the list.
|
DefaultX509TrustManager(String host) |
DefaultX509TrustManager(String host,
KeyStore keyStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] x509Certificates,
String s) |
void |
checkClientTrusted(X509Certificate[] x509Certificates,
String s,
Socket socket) |
void |
checkClientTrusted(X509Certificate[] x509Certificates,
String s,
SSLEngine sslEngine) |
void |
checkServerTrusted(X509Certificate[] x509Certificates,
String s) |
void |
checkServerTrusted(X509Certificate[] x509Certificates,
String s,
Socket socket) |
void |
checkServerTrusted(X509Certificate[] x509Certificates,
String s,
SSLEngine sslEngine) |
X509Certificate[] |
getAcceptedIssuers() |
public DefaultX509TrustManager(String host) throws NoSuchAlgorithmException, KeyStoreException
public DefaultX509TrustManager(List<String> hosts) throws NoSuchAlgorithmException, KeyStoreException
Note: ANY matching host from the list is accepted.
E.g.: Given a host list [A,B], the server B is allowed to offer a certificate issued to A
hosts - The hosts to check the certificate subject againstNoSuchAlgorithmExceptionKeyStoreExceptionpublic DefaultX509TrustManager(String host, KeyStore keyStore) throws NoSuchAlgorithmException, KeyStoreException
public DefaultX509TrustManager(List<String> hosts, KeyStore keyStore) throws NoSuchAlgorithmException, KeyStoreException
Note: ANY matching host from the list is accepted.
E.g.: Given a host list [A,B], the server B is allowed to offer a certificate issued to A
hosts - The hosts to check the certificate subject againstkeyStore - The trusted KeyStoreNoSuchAlgorithmExceptionKeyStoreExceptionpublic X509Certificate[] getAcceptedIssuers()
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException
CertificateExceptionpublic void checkServerTrusted(X509Certificate[] x509Certificates, String s, Socket socket) throws CertificateException
checkServerTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic void checkServerTrusted(X509Certificate[] x509Certificates, String s, SSLEngine sslEngine) throws CertificateException
checkServerTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic void checkClientTrusted(X509Certificate[] x509Certificates, String s, SSLEngine sslEngine) throws CertificateException
checkClientTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic void checkClientTrusted(X509Certificate[] x509Certificates, String s, Socket socket) throws CertificateException
checkClientTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException
CertificateExceptionCopyright © 2012–2021 Graylog, Inc.. All rights reserved.