Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetHTTPResponseReady returning -1 on Android again on protected folders

Author
Message
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 2nd May 2016 20:25
AGK 2.18; My app connects and sends POST data to a mySQL database.

Using SetHTTPHost with secure set to 1 and password details added, Windows and iOS can send data, Android always fails with -1. SetHTTPTimeout is set to 10000, with a sync() added.
Removing password protection from the server folders and using rhe non-secure version of SetHTTPHost, Android connects and sends data just fine.
My server is https using a Comodo certificate.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd May 2016 18:37
Can you check if it is the password protection or the HTTPS connection that is causing it? They are two very different things. If it turns out to be the HTTPS connection then does setting SetHTTPVerifyCertificate to 0 fix it?
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 3rd May 2016 21:34
I turned off password protection on the server and built the app using SetHTTPHost(http, domain, 1) (no login/password) - same problem. Returns -1
SetHTTPVerifyCertificate 0 on the other hand does fix it. Is there anything else I can do to make it more secure on my end?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd May 2016 22:39
Ok, that probably means your certificate authority is using a relatively new certificate that isn't in our certificate authority bundle, so it can't verify your server's certificate. I'll update our CA bundle for the next version which should fix it.
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 4th May 2016 00:34
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 16th May 2016 18:55
The problem persists in AppGameKit V2.0.19 Beta. Android can only connect to servers using the Secure flag by setting SetHTTPVerifyCertificate to 0; Windows can connect with this set to 1.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th May 2016 00:07
Can you send me a link to the page so I can check its certificate?
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th May 2016 17:15
It looks like the code we use to verify SSL certificate chains is very picky about the order of the certificates in the chain, I'm not sure if I can edit it to remove this dependency.

In this case the chain is

but they are being sent from the server in this order


Is it possible for you to change the order of the certificates in your .pem file?
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 17th May 2016 21:19
Doesn't look like it, my provider doesn't support changes to the order via their dashboard, and .pem export is a single contiguous block of encryption. I tried changing CA from Comodo to Let's Encrypt! but the result is the same.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th May 2016 23:47
Ok, I'll see what I can do
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 18th May 2016 12:04
Fixed for the next version
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 18th May 2016 20:41

Login to post a reply

Server time is: 2024-11-25 08:41:45
Your offset time is: 2024-11-25 08:41:45