【发布时间】:2013-07-02 04:10:03
【问题描述】:
我正在为 Android 使用 Koushik Dutta 的 Ion 网络库。我需要覆盖 SSL 检查以进行调试。我发现了如何使用以下方法设置我自己的 SSL 上下文和 TrustManager:
Ion.getDefault(context).getHttpClient().getSSLSocketMiddleware().setSSLContext(mySslContext);
Ion.getDefault(context).getHttpClient().getSSLSocketMiddleware().setTrustManagers(myTrustManager);
但我不知道如何传入我自己的 HostnameVerifier。使用 HttpsUrlConnection 就像
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier(myHostNameVerifier);
有没有人使用 ion 覆盖 SSL?有什么想法吗?
【问题讨论】:
标签: android networking ion-koush androidasync-koush