Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -14691,6 +14691,7 @@ package android.net.http { public class X509TrustManagerExtensions { ctor public X509TrustManagerExtensions(javax.net.ssl.X509TrustManager) throws java.lang.IllegalArgumentException; method public java.util.List<java.security.cert.X509Certificate> checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.lang.String) throws java.security.cert.CertificateException; method public boolean isUserAddedCertificate(java.security.cert.X509Certificate); } } core/java/android/net/http/X509TrustManagerExtensions.java +14 −0 Original line number Diff line number Diff line Loading @@ -63,4 +63,18 @@ public class X509TrustManagerExtensions { String host) throws CertificateException { return mDelegate.checkServerTrusted(chain, authType, host); } /** * Checks whether a CA certificate is added by an user. * * <p>Since {@link X509TrustManager#checkServerTrusted} allows its parameter {@code chain} to * chain up to user-added CA certificates, this method can be used to perform additional * policies for user-added CA certificates. * * @return {@code true} to indicate that the certificate was added by the user, {@code false} * otherwise. */ public boolean isUserAddedCertificate(X509Certificate cert) { return mDelegate.isUserAddedCertificate(cert); } } Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -14691,6 +14691,7 @@ package android.net.http { public class X509TrustManagerExtensions { ctor public X509TrustManagerExtensions(javax.net.ssl.X509TrustManager) throws java.lang.IllegalArgumentException; method public java.util.List<java.security.cert.X509Certificate> checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.lang.String) throws java.security.cert.CertificateException; method public boolean isUserAddedCertificate(java.security.cert.X509Certificate); } }
core/java/android/net/http/X509TrustManagerExtensions.java +14 −0 Original line number Diff line number Diff line Loading @@ -63,4 +63,18 @@ public class X509TrustManagerExtensions { String host) throws CertificateException { return mDelegate.checkServerTrusted(chain, authType, host); } /** * Checks whether a CA certificate is added by an user. * * <p>Since {@link X509TrustManager#checkServerTrusted} allows its parameter {@code chain} to * chain up to user-added CA certificates, this method can be used to perform additional * policies for user-added CA certificates. * * @return {@code true} to indicate that the certificate was added by the user, {@code false} * otherwise. */ public boolean isUserAddedCertificate(X509Certificate cert) { return mDelegate.isUserAddedCertificate(cert); } }