I’m able to make requests to some https urls, but others fail with the error SSL handshake failed (-1). I’ve looked at the traffic in wireshark, and I’ve ruled out cipher suite issues. My current suspicion is that it has something to do with SNI. But it would help if I could get a bit more info from you guys:
From inspecting the http module, it looks like Defold uses LuaSocket 3.0-rc1. But if I’m not mistaken, the luasocket library on its own doesn’t support TLS, does it?
Are you also using something like LuaSec? If so, what version? I found a LuaSec issue that could be related to my problem (https://github.com/brunoos/luasec/issues/44) and the fix was only merged in on Dec 22, 2016.
Thanks,
-Eric
EDIT:
Other threads suggest that you’re not using LuaSec. So what have you used to enable https requests then?
I have access to a server with a handful of other sites which also result the same. Every site on the server. Perhaps Defold is not playing nice with some header security policies?
So, this is a cipher problem and the TLS/SSL library we use does not support Diffie Hellman ciphers which those sites requires (either elliptic curve or “plain”).
Unfortunately adding that is not an easy task so we would most likely need to use a different library which is not a small task and needs to be discussed internally.
Our implementation supports the following ciphers: TLS_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_256_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA256 TLS_RSA_WITH_AES_256_CBC_SHA256
Thank you all very much for looking into this, and providing information. I’ve been watching this issue for a while, hoping for a solution. This information I think will solve my use case scenario.
Running an Apache web-server defaults to the following ciphers.
I finally got around to testing this. Defold SSL connection is successful to my servers if I add
AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA to the default cipher list.
One thing to note, these ciphers were recently marked “weak” by SSL Labs due to the Robot Attack. It didn’t effect my rating, but maybe worth noting.