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

2019-09-11 03:30发布

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条回答
甜甜的少女心
2楼-- · 2019-09-11 03:32

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

查看更多
登录 后发表回答