# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# X509TrustManagerExtensions

`public class X509TrustManagerExtensions`
`extends Object` ``

java.lang.Object
↳ | android.net.http.X509TrustManagerExtensions

X509TrustManager wrapper exposing Android-added features.

The checkServerTrusted method allows callers to perform additional verification of certificate chains after they have been successfully verified by the platform.

## Summary

### Public constructors
`X509TrustManagerExtensions(X509TrustManager tm)` Constructs a new X509TrustManagerExtensions wrapper.

### Public methods
`List<X509Certificate>` | `checkServerTrusted(X509Certificate[] chain, String authType, String host)` Verifies the given certificate chain.
`boolean` | `isSameTrustConfiguration(String hostname1, String hostname2)` Returns `true` if the TrustManager uses the same trust configuration for the provided hostnames.
`boolean` | `isUserAddedCertificate(X509Certificate cert)` Checks whether a CA certificate is added by an user.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### X509TrustManagerExtensions

    public X509TrustManagerExtensions (X509TrustManager tm)

Constructs a new X509TrustManagerExtensions wrapper.

Parameters
`tm` | `X509TrustManager`: A `X509TrustManager` as returned by TrustManagerFactory.getInstance();

Throws
`IllegalArgumentException` | If tm is an unsupported TrustManager type.

## Public methods

### checkServerTrusted

    public List<X509Certificate> checkServerTrusted (X509Certificate[] chain,
                    String authType,
                    String host)

Verifies the given certificate chain.

See `X509TrustManager#checkServerTrusted(X509Certificate[], String)` for a description of the chain and authType parameters. The final parameter, host, should be the hostname of the server.

Parameters
`chain` | `X509Certificate`
`authType` | `String`
`host` | `String`

Returns
`List<X509Certificate>` | the properly ordered chain used for verification as a list of X509Certificates.

Throws
`CertificateException` | if the chain does not verify correctly.

### isSameTrustConfiguration

    public boolean isSameTrustConfiguration (String hostname1,
                    String hostname2)

Returns `true` if the TrustManager uses the same trust configuration for the provided hostnames.

Parameters
`hostname1` | `String`
`hostname2` | `String`

Returns
`boolean` |

### isUserAddedCertificate

    public boolean isUserAddedCertificate (X509Certificate cert)

Checks whether a CA certificate is added by an user.

Since `X509TrustManager#checkServerTrusted` may allow its parameter `chain` to chain up to user-added CA certificates, this method can be used to perform additional policies for user-added CA certificates.

Parameters
`cert` | `X509Certificate`

Returns
`boolean` | `true` to indicate that the certificate authority exists in the user added certificate store, `false` otherwise.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*