es.gob.fnmt.net.ssl

## Class DNIeSSLSocketFactory

- java.lang.Object
- - es.gob.fnmt.net.ssl.DNIeSSLSocketFactory

-     public final class DNIeSSLSocketFactory
      extends java.lang.Object

  DNIe proprietary javax.net.ssl.SSLSocketFactory.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_SSL_PROTOCOL`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.net.ssl.SSLSocketFactory` | `getInstance(java.security.KeyStore clientKeyStore, java.security.KeyStore trustCertStore, KeyManagerPolicy keyManagerPolicy, android.content.Context context)` Get SSL Socket factory.
    `static javax.net.ssl.SSLSocketFactory` | `getInstance(java.security.KeyStore clientKeyStore, java.security.KeyStore trustCertStore, KeyManagerPolicy keyManagerPolicy, java.lang.String protocol, android.content.Context context)` Get SSL Socket factory.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_SSL_PROTOCOL

          public static final java.lang.String DEFAULT_SSL_PROTOCOL

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          public static javax.net.ssl.SSLSocketFactory getInstance(java.security.KeyStore clientKeyStore,
                                                                   java.security.KeyStore trustCertStore,
                                                                   KeyManagerPolicy keyManagerPolicy,
                                                                   android.content.Context context)
                                                            throws java.security.GeneralSecurityException

      Get SSL Socket factory. Default 'TLSv1' SSL/TLS protocol is used.
      Parameters:
        `clientKeyStore` - container with the client certificates for authentication.
        `trustCertStore` - container with the trusted CA (Certificate Authority) certificate keystore for server authentication.
        `keyManagerPolicy` - policies for retrieving the client certificate for authentication.
        `context` - application context.
      Returns:
        SSL Socket factory.
      Throws:
        `java.security.GeneralSecurityException`
        `java.lang.IllegalArgumentException` - if `context` is `null`.

    - #### getInstance

          public static javax.net.ssl.SSLSocketFactory getInstance(java.security.KeyStore clientKeyStore,
                                                                   java.security.KeyStore trustCertStore,
                                                                   KeyManagerPolicy keyManagerPolicy,
                                                                   java.lang.String protocol,
                                                                   android.content.Context context)
                                                            throws java.security.GeneralSecurityException

      Get SSL Socket factory.
      Parameters:
        `clientKeyStore` - container with the client certificates for authentication.
        `trustCertStore` - container with the trusted CA (Certificate Authority) certificate keystore for server authentication.
        `keyManagerPolicy` - policies for retrieving the client certificate for authentication.
        `protocol` - SSL/TLS protocol ("SSLv3", "TLSv1", ""TLSv1.1", "TLSv2", etc.).
        `context` - application context.
      Returns:
        SSL Socket factory.
      Throws:
        `java.lang.IllegalArgumentException` - if `protocol` or `context` is `null`.
        `java.security.GeneralSecurityException`