相关疑难解决方法(0)

Android SSL - SNI支持

我想知道Android SDK中对SSL/TLS服务器名称指示(SNI)扩展的支持.

ssl android sni

23
推荐指数
1
解决办法
2万
查看次数

javax.net.ssl.SSLException:证书中的主机名在Android中不匹配

我正在更新android应用程序的Web服务URL,我们正在使用https协议.我看到我当前的https网址正在运行,但现在我们正在迁移到新域,然后它正在创建问题.

我在stackoverflow上检查了许多线程,如javax.net.ssl.SSLException:证书中的主机名与android不匹配,但没有找到任何好的答案,主要是回答绕过此安全或允许所有.

javax.net.ssl.SSLException:证书中的主机名不匹配:

//HttpGet getMethod = new HttpGet(String.format(httpURL));
HttpGet getMethod = new HttpGet(httpURL);
DefaultHttpClient client = new DefaultHttpClient();
ResponseHandler<String> responseHandler = new BasicResponseHandler();
HttpParams params = client.getParams();
params.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 60000);
params.setParameter(CoreConnectionPNames.SO_TIMEOUT, 60000);
client.setParams(params);
responseBody = client.execute(getMethod, responseHandler);
responseBody = responseBody.trim();
Run Code Online (Sandbox Code Playgroud)

提前致谢.

ssl https android web-services

4
推荐指数
2
解决办法
8427
查看次数

标签 统计

android ×2

ssl ×2

https ×1

sni ×1

web-services ×1