Package org.apache.pulsar.common.util
Class TrustManagerProxy
java.lang.Object
javax.net.ssl.X509ExtendedTrustManager
org.apache.pulsar.common.util.TrustManagerProxy
- All Implemented Interfaces:
TrustManager,X509TrustManager
This class wraps
X509ExtendedTrustManager and gives opportunity to refresh Trust-manager with refreshed certs
without changing SslContext.-
Constructor Summary
ConstructorsConstructorDescriptionTrustManagerProxy(String caCertFile, int refreshDurationSec, ScheduledExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] x509Certificates, String s) voidcheckClientTrusted(X509Certificate[] chain, String authType, Socket socket) voidcheckClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) voidcheckServerTrusted(X509Certificate[] x509Certificates, String s) voidcheckServerTrusted(X509Certificate[] chain, String authType, Socket socket) voidcheckServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)
-
Constructor Details
-
TrustManagerProxy
public TrustManagerProxy(String caCertFile, int refreshDurationSec, ScheduledExecutorService executor)
-
-
Method Details
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException - Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException - Throws:
CertificateException
-
getAcceptedIssuers
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException - Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException - Specified by:
checkClientTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException - Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException - Specified by:
checkServerTrustedin classX509ExtendedTrustManager- Throws:
CertificateException
-