php - Differences between the static variables of SSLSocketFactory -
i'm implementing web server in php , doing connection android app,i'm using sslsocketfactory differences between static options of sslsocketfactory:
strict_hostname_verifier
browser_compatible_hostname_verifier
allow_all__hostname_verifier
defaulthttpclient ret = null; //sets parameters httpparams params = new basichttpparams(); httpprotocolparams.setversion(params, httpversion.http_1_1); httpprotocolparams.setcontentcharset(params, "utf-8"); params.setbooleanparameter("http.protocol.expect-continue", false); //registers schemes both http , https schemeregistry registry = new schemeregistry(); registry.register(new scheme("http", plainsocketfactory.getsocketfactory(), 80)); final sslsocketfactory sslsocketfactory = new mysslsocketfactory(sslcontext); //final sslsocketfactory sslsocketfactory = sslsocketfactory.getsocketfactory(); sslsocketfactory.sethostnameverifier(sslsocketfactory.strict_hostname_verifier); registry.register(new scheme("https", sslsocketfactory, 443)); threadsafeclientconnmanager manager = new threadsafeclientconnmanager(params, registry); return ret = new defaulthttpclient(manager, params);
Comments
Post a Comment