org.apache.jmeter.protocol.http.util

## Class HC4TrustAllSSLSocketFactory

- java.lang.Object
- - org.apache.http.conn.ssl.SSLSocketFactory
  - - org.apache.jmeter.protocol.http.util.HC4TrustAllSSLSocketFactory

- All Implemented Interfaces:
    org.apache.http.conn.scheme.LayeredSchemeSocketFactory, org.apache.http.conn.scheme.LayeredSocketFactory, org.apache.http.conn.scheme.SchemeLayeredSocketFactory, org.apache.http.conn.scheme.SchemeSocketFactory, org.apache.http.conn.scheme.SocketFactory, org.apache.http.conn.socket.ConnectionSocketFactory, org.apache.http.conn.socket.LayeredConnectionSocketFactory

      public class HC4TrustAllSSLSocketFactory
      extends org.apache.http.conn.ssl.SSLSocketFactory

  Apache HttpClient protocol factory to generate SSL sockets

- - ### Field Summary

    - ### Fields inherited from class org.apache.http.conn.ssl.SSLSocketFactory

      `ALLOW_ALL_HOSTNAME_VERIFIER, BROWSER_COMPATIBLE_HOSTNAME_VERIFIER, SSL, SSLV2, STRICT_HOSTNAME_VERIFIER, TLS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `HC4TrustAllSSLSocketFactory()` Create an SSL factory which trusts all certificates and hosts.
    `protected` | `HC4TrustAllSSLSocketFactory(SSLSocketFactory factory)` Create an SSL factory which trusts all certificates and hosts.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Socket` | `createLayeredSocket(Socket socket, String host, int port, boolean autoClose)`
    `Socket` | `createSocket()`
    `Socket` | `createSocket(org.apache.http.params.HttpParams params)`

    - ### Methods inherited from class org.apache.http.conn.ssl.SSLSocketFactory

      `connectSocket, connectSocket, connectSocket, createLayeredSocket, createLayeredSocket, createSocket, createSocket, getHostnameVerifier, getSocketFactory, getSystemSocketFactory, isSecure, prepareSocket, setHostnameVerifier`

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

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

- - ### Constructor Detail

    - #### HC4TrustAllSSLSocketFactory

          public HC4TrustAllSSLSocketFactory()
                                      throws GeneralSecurityException

      Create an SSL factory which trusts all certificates and hosts. `SSLSocketFactory.SSLSocketFactory(TrustStrategy, org.apache.http.conn.ssl.X509HostnameVerifier)`
      Throws:
        `GeneralSecurityException` - if there's a problem setting up the security

    - #### HC4TrustAllSSLSocketFactory

          protected HC4TrustAllSSLSocketFactory(SSLSocketFactory factory)
                                         throws GeneralSecurityException

      Create an SSL factory which trusts all certificates and hosts. `SSLSocketFactory.SSLSocketFactory(TrustStrategy, org.apache.http.conn.ssl.X509HostnameVerifier)`
      Parameters:
        `factory` - javax.net.ssl.SSLSocketFactory
      Throws:
        `GeneralSecurityException` - if there's a problem setting up the security

  - ### Method Detail

    - #### createSocket

          public Socket createSocket(org.apache.http.params.HttpParams params)
                              throws IOException

      Specified by:
        `createSocket` in interface `org.apache.http.conn.scheme.SchemeSocketFactory`
      Overrides:
        `createSocket` in class `org.apache.http.conn.ssl.SSLSocketFactory`
      Throws:
        `IOException`

    - #### createSocket

          public Socket createSocket()
                              throws IOException

      Specified by:
        `createSocket` in interface `org.apache.http.conn.scheme.SocketFactory`
      Overrides:
        `createSocket` in class `org.apache.http.conn.ssl.SSLSocketFactory`
      Throws:
        `IOException`

    - #### createLayeredSocket

          public Socket createLayeredSocket(Socket socket,
                                            String host,
                                            int port,
                                            boolean autoClose)
                                     throws IOException,
                                            UnknownHostException

      Specified by:
        `createLayeredSocket` in interface `org.apache.http.conn.scheme.LayeredSchemeSocketFactory`
      Overrides:
        `createLayeredSocket` in class `org.apache.http.conn.ssl.SSLSocketFactory`
      Throws:
        `IOException`
        `UnknownHostException`

Copyright © 1998-2017 Apache Software Foundation. All Rights Reserved.