@@ -0,0 +1,1982 @@
+/**%0A * Created by Sean Lee on 23/9/15.%0A */%0Aimport org.apache.http.conn.ssl.SSLSocketFactory;%0A%0Aimport java.io.IOException;%0Aimport java.net.Socket;%0Aimport java.net.UnknownHostException;%0Aimport java.security.KeyManagementException;%0Aimport java.security.KeyStore;%0Aimport java.security.KeyStoreException;%0Aimport java.security.NoSuchAlgorithmException;%0Aimport java.security.UnrecoverableKeyException;%0A%0Aimport javax.net.ssl.SSLContext;%0Aimport javax.net.ssl.TrustManager;%0Aimport javax.net.ssl.X509TrustManager;%0A%0Apublic class HotelSSLSocketFactory extends SSLSocketFactory %7B%0A%0A    SSLContext sslContext = SSLContext.getInstance(%22TLS%22);%0A%0A    public HotelSSLSocketFactory(KeyStore truststore)%0A            throws NoSuchAlgorithmException, KeyManagementException,%0A            KeyStoreException, UnrecoverableKeyException %7B%0A        super(truststore);%0A%0A        TrustManager tm = new X509TrustManager() %7B%0A%0A            public java.security.cert.X509Certificate%5B%5D getAcceptedIssuers() %7B%0A                return null;%0A            %7D%0A%0A            @Override%0A            public void checkClientTrusted(%0A                    java.security.cert.X509Certificate%5B%5D chain, String authType)%0A                    throws java.security.cert.CertificateException %7B%0A%0A            %7D%0A%0A            @Override%0A            public void checkServerTrusted(%0A                    java.security.cert.X509Certificate%5B%5D chain, String authType)%0A                    throws java.security.cert.CertificateException %7B%0A%0A            %7D%0A        %7D;%0A%0A        sslContext.init(null, new TrustManager%5B%5D%7Btm%7D, null);%0A    %7D%0A%0A    @Override%0A    public Socket createSocket(Socket socket, String host, int port,%0A                               boolean autoClose) throws IOException, UnknownHostException %7B%0A        return sslContext.getSocketFactory().createSocket(socket, host, port,%0A                autoClose);%0A    %7D%0A%0A    @Override%0A    public Socket createSocket() throws IOException %7B%0A        return sslContext.getSocketFactory().createSocket();%0A    %7D%0A%0A%7D%0A

Create HotelSSLSocketFactory.java