Class AbstractCBLTrustManager
- java.lang.Object
-
- com.couchbase.lite.internal.replicator.AbstractCBLTrustManager
-
- All Implemented Interfaces:
TrustManager,X509TrustManager
- Direct Known Subclasses:
CBLTrustManager
public abstract class AbstractCBLTrustManager extends Object implements X509TrustManager
The trust manager that supports the followings: 1. Supports pinned server certificate. 2. Supports acceptOnlySelfSignedServerCertificate mode. 3. Supports default trust manager for validating certs when the pinned server certificate and acceptOnlySelfSignedServerCertificate are not used. 4. Allows to listen for the server certificates.
-
-
Constructor Summary
Constructors Constructor Description AbstractCBLTrustManager(X509Certificate pinnedServerCert, boolean acceptOnlySelfSignedServerCertificate, Fn.Consumer<List<Certificate>> serverCertsListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckClientTrusted(X509Certificate[] chain, String authType)voidcheckServerTrusted(X509Certificate[] chain, String authType)X509Certificate[]getAcceptedIssuers()
-
-
-
Constructor Detail
-
AbstractCBLTrustManager
public AbstractCBLTrustManager(@Nullable X509Certificate pinnedServerCert, boolean acceptOnlySelfSignedServerCertificate, @NonNull Fn.Consumer<List<Certificate>> serverCertsListener)
-
-
Method Detail
-
getAcceptedIssuers
@NonNull public X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuersin interfaceX509TrustManager
-
checkClientTrusted
public void checkClientTrusted(@Nullable X509Certificate[] chain, @Nullable String authType)- Specified by:
checkClientTrustedin interfaceX509TrustManager
-
checkServerTrusted
public void checkServerTrusted(@Nullable X509Certificate[] chain, @Nullable String authType) throws CertificateException- Specified by:
checkServerTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
-