@@ -0,0 +1,1797 @@
+/*%0A *  Copyright 2015 GoIn Inc. All rights reserved.%0A */%0A%0Apackage com.liuguangqiang.asyncokhttp.ssl;%0A%0Aimport java.security.KeyManagementException;%0Aimport java.security.NoSuchAlgorithmException;%0Aimport java.security.cert.CertificateException;%0Aimport java.security.cert.X509Certificate;%0A%0Aimport javax.net.ssl.HostnameVerifier;%0Aimport javax.net.ssl.HttpsURLConnection;%0Aimport javax.net.ssl.SSLContext;%0Aimport javax.net.ssl.SSLSession;%0Aimport javax.net.ssl.SSLSocketFactory;%0Aimport javax.net.ssl.TrustManager;%0Aimport javax.net.ssl.X509TrustManager;%0A%0A/**%0A * Created by Eric on 15/10/21.%0A */%0Apublic class CustomSSLSocketFactoryCreator %7B%0A%0A    public SSLSocketFactory create() %7B%0A        SSLSocketFactory sslSocketFactory = null;%0A        X509TrustManager tm = new X509TrustManager() %7B%0A            public void checkClientTrusted(X509Certificate%5B%5D chain, String authType) throws CertificateException %7B%0A            %7D%0A%0A            public void checkServerTrusted(X509Certificate%5B%5D chain, String authType) throws CertificateException %7B%0A            %7D%0A%0A            public X509Certificate%5B%5D getAcceptedIssuers() %7B%0A                return null;%0A            %7D%0A        %7D;%0A%0A%0A        try %7B%0A            HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() %7B%0A%0A                @Override%0A                public boolean verify(String s, SSLSession sslSession) %7B%0A                    return true;%0A                %7D%0A%0A            %7D);%0A            SSLContext sc = SSLContext.getInstance(%22TLS%22);%0A            sc.init(null, new TrustManager%5B%5D%7Btm%7D, null);%0A            sslSocketFactory = sc.getSocketFactory();%0A        %7D catch (KeyManagementException e) %7B%0A            e.printStackTrace();%0A        %7D catch (NoSuchAlgorithmException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return sslSocketFactory;%0A    %7D%0A%0A%7D%0A

Create CustomSSLSocketFactoryCreator for creating a custom SSLSocketFactory that will ignore the hostname verify.