akifox-asynchttp icon indicating copy to clipboard operation
akifox-asynchttp copied to clipboard

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

Open alanlanglois opened this issue 7 years ago • 8 comments

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.

alanlanglois avatar Oct 25 '17 13:10 alanlanglois

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.

yupswing avatar Oct 25 '17 13:10 yupswing

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

alanlanglois avatar Oct 27 '17 11:10 alanlanglois

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 👍

PaulGene avatar Oct 27 '17 12:10 PaulGene

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

alanlanglois avatar Oct 27 '17 13:10 alanlanglois

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

PaulGene avatar Oct 28 '17 00:10 PaulGene

@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...

PaulGene avatar Nov 09 '17 16:11 PaulGene

@PaulGene That works for me! Thanks a lot 👍

anissen avatar Apr 16 '18 14:04 anissen

I can confirm this works for me too.

PaulGene avatar Apr 22 '18 00:04 PaulGene