public class DelegatingX509ExtendedTrustManager extends X509ExtendedTrustManager
X509ExtendedTrustManager
that delegates to a runtime mutable delegate X509ExtendedTrustManager
.Constructor and Description |
---|
DelegatingX509ExtendedTrustManager(X509ExtendedTrustManager delegate)
Constructor for a
X509ExtendedTrustManager that will trust any certificates that are both currently
valid and trusted by the supplied X509ExtendedTrustManager . |
Modifier and Type | Method and Description |
---|---|
void |
checkClientTrusted(X509Certificate[] chain,
String authType) |
void |
checkClientTrusted(X509Certificate[] chain,
String authType,
Socket socket) |
void |
checkClientTrusted(X509Certificate[] chain,
String authType,
SSLEngine engine) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType,
Socket socket) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType,
SSLEngine engine) |
X509Certificate[] |
getAcceptedIssuers() |
X509ExtendedTrustManager |
getDelegate()
Gets the current delegate.
|
void |
setDelegate(X509ExtendedTrustManager delegate)
Switches the delegate for a new one.
|
public DelegatingX509ExtendedTrustManager(@NonNull X509ExtendedTrustManager delegate)
X509ExtendedTrustManager
that will trust any certificates that are both currently
valid and trusted by the supplied X509ExtendedTrustManager
.delegate
- the supplied X509ExtendedTrustManager
that all certificates must additionally be trusted
by in order for a currently valid certificate to be trusted.public void setDelegate(@NonNull X509ExtendedTrustManager delegate)
delegate
- the new delegate.@NonNull public X509ExtendedTrustManager getDelegate()
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException
checkClientTrusted
in class X509ExtendedTrustManager
CertificateException
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException
checkServerTrusted
in class X509ExtendedTrustManager
CertificateException
public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException
checkClientTrusted
in class X509ExtendedTrustManager
CertificateException
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException
checkServerTrusted
in class X509ExtendedTrustManager
CertificateException
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
CertificateException
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
CertificateException
public X509Certificate[] getAcceptedIssuers()
Copyright © 2004–2022. All rights reserved.