Class SslHelper


  • public final class SslHelper
    extends java.lang.Object

    This class should not be considered a part of the public API.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void enableHostNameVerification​(javax.net.ssl.SSLParameters sslParameters)
      Enable HTTP endpoint verification on the given SSL parameters.
      static void enableSni​(java.lang.String host, javax.net.ssl.SSLParameters sslParameters)
      Enable SNI if running on Java 8 or later.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • enableHostNameVerification

        public static void enableHostNameVerification​(javax.net.ssl.SSLParameters sslParameters)
        Enable HTTP endpoint verification on the given SSL parameters.
        Parameters:
        sslParameters - The original SSL parameters
      • enableSni

        public static void enableSni​(java.lang.String host,
                                     javax.net.ssl.SSLParameters sslParameters)
        Enable SNI if running on Java 8 or later. Otherwise fail silently to enable SNI.
        Parameters:
        host - the server host
        sslParameters - the SSL parameters