【发布时间】:2011-04-19 00:59:27
【问题描述】:
我的 android 应用程序与受 SSL 证书保护的服务器通信。下面是它的代码。
final HttpPost httppost = new HttpPost("https://www.myurl.com");
final List<NameValuePair> postlist = Utils.HttpGetToHttpPost(Arguments);
httppost.setEntity(new UrlEncodedFormEntity(postlist));
final HttpResponse response = httpclient.execute(httppost);
现在我的问题是如何防止 MITM 攻击。如何确保我与 myurl.com 而不是另一个 url 交谈。
【问题讨论】: