类 TlsHelper

    • 构造器概要

      构造器 
      构造器 说明
      TlsHelper()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static javax.net.ssl.SSLContext buildSslContext​(boolean forClient)
      Returns a SSLContexts.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • TlsHelper

        public TlsHelper()
    • 方法详细资料

      • buildSslContext

        public static javax.net.ssl.SSLContext buildSslContext​(boolean forClient)
                                                        throws java.security.NoSuchAlgorithmException,
                                                               java.security.KeyManagementException
        Returns a SSLContexts.

        For example

        HttpsURLConnection.setDefaultSSLSocketFactory(TlsHelper.buildSslContext(true).getSocketFactory());
        参数:
        forClient - whether for client
        返回:
        SSLContext
        抛出:
        java.security.NoSuchAlgorithmException - Not support the specified algorithm
        java.security.KeyManagementException - KeyManagement exception