yupswing / akifox-asynchttp

Haxe Asynchronous HTTP+HTTPS Requests Library
MIT License
72 stars 19 forks source link

iOS : ERROR:Request failed -> SSL - No CA Chain is set, but required to operate #43

Open alanlanglois opened 7 years ago

alanlanglois commented 7 years ago

Hi, I'm using this library for a project compiling to HTML5, Android & iOS. It works pretty well when targeting HTML5 & Android, but I'm having this error when targeting iOS:

AsyncHttp.hx:195: Yytx6ROf ERROR:Request failed -> SSL - No CA Chain is set, but required to operate Is there something iOS specific I need to do/change/ask in order to make it work on iOS too?

Thx.

yupswing commented 7 years ago

can't test it right now but as you might imagine it's most likely not a problem related to akifox-asynchttp but more about Socket connections with SSL on iOS.

About the latter I can't really do anything.

alanlanglois commented 7 years ago

Ok thx, Do you know if there is a way to have SSL connexion on iOS using Haxe?

PaulGene commented 7 years ago

Warning: SSL doesn't work 100% on Android either, I have some php code that sends back xml and if the xml is over a certain size I get errors ( the same xml loads perfectly fine over HTTP ) It seems we are pretty much stuck without working SSL in Haxe for the foreseeable future. I haven't tried this yet but this seems like the only option on iOS https://github.com/jiveui/openfl-ios-networking

UPDATE I seem to have found a work around for this, i was using the HTTP/1.0 protocol because i ran into problem using HTTP/1.1 (which are now fixed)

With HTTP/1.1 the problem seems to go away 👍

alanlanglois commented 7 years ago

Thank you @PaulGene We use HTTPS, this lib doesn't seem to support it. :(

PaulGene commented 7 years ago

Arrgghh Its been linked on threads about SSL so i assumed it had support :(

PaulGene commented 7 years ago

@alanlanglois I'm unable to test this as i cant build for iOS at the moment but somebody suggested the following:

try this setting in akifox sys.ssl.Socket.DEFAULT_VERIFY_CERT = false;

try testing with that, and if that works then just remember to apply a certificate for your production use

Might be worth a shot...

anissen commented 6 years ago

@PaulGene That works for me! Thanks a lot 👍

PaulGene commented 6 years ago

I can confirm this works for me too.