![JAR search and dependency download from the Maven repository](/logo.png)
org.spongycastle.jsse.provider.ProvX509ExtendedTrustManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bctls-jdk15on Show documentation
Show all versions of bctls-jdk15on Show documentation
Spongy Castle is a package-rename (org.bouncycastle.* to org.spongycastle.*) of Bouncy Castle
intended for the Android platform. Android unfortunately ships with a stripped-down version of
Bouncy Castle, which prevents easy upgrades - Spongy Castle overcomes this and provides a full,
up-to-date version of the Bouncy Castle cryptographic libs.
The newest version!
package org.spongycastle.jsse.provider;
import java.net.Socket;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.X509ExtendedTrustManager;
class ProvX509ExtendedTrustManager
extends X509ExtendedTrustManager
{
private final ProvX509TrustManager trustManager;
public ProvX509ExtendedTrustManager(ProvX509TrustManager trustManager)
{
this.trustManager = trustManager;
}
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType)
throws CertificateException
{
trustManager.checkClientTrusted(x509Certificates, authType);
}
public void checkServerTrusted(X509Certificate[] x509Certificates, String authType)
throws CertificateException
{
trustManager.checkServerTrusted(x509Certificates, authType);
}
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType, Socket socket)
throws CertificateException
{
// TODO: need to confirm cert and client identity match
// TODO: need to make sure authType makes sense.
trustManager.validatePath(x509Certificates);
}
public void checkServerTrusted(X509Certificate[] x509Certificates, String authType, Socket socket)
throws CertificateException
{
// TODO: need to confirm cert and server identity match
// TODO: need to make sure authType makes sense.
trustManager.validatePath(x509Certificates);
}
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType, SSLEngine sslEngine)
throws CertificateException
{
// TODO: need to confirm cert and client identity match
// TODO: need to make sure authType makes sense.
trustManager.validatePath(x509Certificates);
}
public void checkServerTrusted(X509Certificate[] x509Certificates, String authType, SSLEngine sslEngine)
throws CertificateException
{
// TODO: need to confirm cert and server identity match
// TODO: need to make sure authType makes sense.
trustManager.validatePath(x509Certificates);
}
public X509Certificate[] getAcceptedIssuers()
{
return trustManager.getAcceptedIssuers();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy