Code example for SSLSocketFactory

0
 
    public static Scheme getMockedScheme() throws NoSuchAlgorithmException, KeyManagementException {
	SSLContext sslcontext = SSLContext.getInstance("TLS");
 
	sslcontext.init(null, new TrustManager[] { new DummyX509TrustManager() }, null);
	SSLSocketFactory sf = new SSLSocketFactory(sslcontext);
	Scheme https = new Scheme("https", 443, sf);
 
	return https;
    } 
 
    /** 
     * Generates android checkin request with properties of "Galaxy S3". 
     *  
     * <a href= 
     * "http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung+GT-I9300+Galaxy+S+III&testgroup=system" 
     * > http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung 
     * +GT-I9300+Galaxy+S+III&testgroup=system </a> 
     */ 
    public static AndroidCheckinRequest generateAndroidCheckinRequest() {