Class InsecureExtendedTrustManager
- java.lang.Object
-
- javax.net.ssl.X509ExtendedTrustManager
-
- com.browserup.bup.mitm.trustmanager.InsecureExtendedTrustManager
-
- All Implemented Interfaces:
javax.net.ssl.TrustManager,javax.net.ssl.X509TrustManager
public class InsecureExtendedTrustManager extends javax.net.ssl.X509ExtendedTrustManagerAnX509ExtendedTrustManagerandX509TrustManagerthat will accept all server and client certificates. Before accepting a certificate, the InsecureExtendedTrustManager uses the default X509ExtendedTrustManager to determine if the certificate would otherwise be trusted, and logs a debug-level message if it is not trusted.
-
-
Field Summary
Fields Modifier and Type Field Description protected static javax.net.ssl.X509ExtendedTrustManagerDEFAULT_EXTENDED_TRUST_MANAGERThe default extended trust manager, which will be used to determine if certificates would otherwise be trusted.
-
Constructor Summary
Constructors Constructor Description InsecureExtendedTrustManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckClientTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s)voidcheckClientTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, java.net.Socket socket)voidcheckClientTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, javax.net.ssl.SSLEngine sslEngine)voidcheckServerTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s)voidcheckServerTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, java.net.Socket socket)voidcheckServerTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, javax.net.ssl.SSLEngine sslEngine)java.security.cert.X509Certificate[]getAcceptedIssuers()
-
-
-
Method Detail
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, java.net.Socket socket) throws java.security.cert.CertificateException- Specified by:
checkClientTrustedin classjavax.net.ssl.X509ExtendedTrustManager- Throws:
java.security.cert.CertificateException
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, java.net.Socket socket) throws java.security.cert.CertificateException- Specified by:
checkServerTrustedin classjavax.net.ssl.X509ExtendedTrustManager- Throws:
java.security.cert.CertificateException
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, javax.net.ssl.SSLEngine sslEngine) throws java.security.cert.CertificateException- Specified by:
checkClientTrustedin classjavax.net.ssl.X509ExtendedTrustManager- Throws:
java.security.cert.CertificateException
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s, javax.net.ssl.SSLEngine sslEngine) throws java.security.cert.CertificateException- Specified by:
checkServerTrustedin classjavax.net.ssl.X509ExtendedTrustManager- Throws:
java.security.cert.CertificateException
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s) throws java.security.cert.CertificateException- Throws:
java.security.cert.CertificateException
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] x509Certificates, java.lang.String s) throws java.security.cert.CertificateException- Throws:
java.security.cert.CertificateException
-
getAcceptedIssuers
public java.security.cert.X509Certificate[] getAcceptedIssuers()
-
-