Ion w/ Cloudflare free SSL (with SNI) fails with

核能气质少年 提交于 2019-12-25 16:24:51

问题


I'm running into a bug in Ion that koush (the lead dev) thinks may be related to CloudFlare's use of SNI. The bug was reported here: https://github.com/koush/ion/issues/559

I'm looking for a workaround that can deal with CloudFlare Free SSL (Android's HttpClient also fails; though I'm not sure if it is for the same reason).

Ideally, I'd like to just use a workaround working with Ion, but if you know of another library or method to send and receive data over a CloudFlare Free SSL connection I'll gladly use it instead!

So, do you know of any workarounds to this bug?


回答1:


You can disable the middleware that causes the problem by putting the following in your Application.onCreate method.

 Ion.getDefault(getContext()).getConscryptMiddleware().enable(false);

The bug is only in Google Play Services conscrypt. Remove that line at a later time once GPS updates.

The downside of disabling conscrypt is that it also disables SPDY support on older platforms and that it is also a newer, more secure, updated SSL stack.

Source



来源:https://stackoverflow.com/questions/31062019/ion-w-cloudflare-free-ssl-with-sni-fails-with

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!