我们的 android 应用程序指的是HTTP URL
从服务器获取一些数据。直到 2 天前它一直正常工作,但突然我们得到"sslpeerunverifiedexception: no peer certificate" exception
了,而我们的代码和服务器都没有发生任何变化。代码很简单:
HttpParams httpParameters = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParameters, 12000);
HttpConnectionParams.setSoTimeout(httpParameters, 12000);
HttpClient client = new DefaultHttpClient(httpParameters);
HttpGet request = new HttpGet("http://site.com");
HttpResponse httpResponse = client.execute(request);