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

651 views Asked by At

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

There are 1 answers

0
David Murdoch On BEST ANSWER

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