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(javax.net.ssl.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
    --- | ---
    `java.net.Socket` | `createLayeredSocket(java.net.Socket socket, java.lang.String host, int port, boolean autoClose)`
    `java.net.Socket` | `createSocket()`
    `java.net.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 java.security.GeneralSecurityException

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

    - #### HC4TrustAllSSLSocketFactory

          protected HC4TrustAllSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)
                                         throws java.security.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:
        `java.security.GeneralSecurityException` - if there's a problem setting up the security

  - ### Method Detail

    - #### createSocket

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

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

    - #### createSocket

          public java.net.Socket createSocket()
                                       throws java.io.IOException

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

    - #### createLayeredSocket

          public java.net.Socket createLayeredSocket(java.net.Socket socket,
                                                     java.lang.String host,
                                                     int port,
                                                     boolean autoClose)
                                              throws java.io.IOException,
                                                     java.net.UnknownHostException

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

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