axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

OpenSSL/Curl connections from Android 7 and 8 devices fail #1731

Closed Niborski closed 6 months ago

Niborski commented 6 months ago

I've updated my project to use the latest version of Axmol and 3rd party libraries and ever since my app is no longer able to connect to my servers (Nakama) securely via SSL from an Android 7.x or 8.x device.

Reverting to older openssl and curl versions (pre-release 1 of Axmol) solves this issue partly (can get it to work on 8.x), but cannot be a longer term solution.

The servers are configured using Letsencrypt certificates. Latest version of Android that I am able to use to connect to the servers is 9.0 (API 28).

Is this a know issue? Any suggestions on how to solve this using the latest included libraries? This is the only problem on the older versions of Android and I still have around 10 to 15% users on Android 7 and 8, so it would be a share to have to cut them out of updates just because of this.

rh101 commented 6 months ago

Are there any warnings or errors in the console output (via logcat) when it tries to connect? There should be something in there, and that information really should be included it in your post, including any source code used to establish the connection. Basically, provide enough information that would help others to re-produce the issue.

One other thing, does this also happen with Android 8.1? A quick test on an old Nexus 6P with Android 8.1 shows that it is working correctly with SSL in the latest Axmol (Curl/HttpClient etc).

Have you tested connecting to a different server than Nakama?

Niborski commented 6 months ago

Thank you for checking. Yes, I tested it on 8.1 (Emulator only) as well and it does not work for me. Logcat does not contain anything related to the connction issues and I indeed tried to connect to other servers as well (a flask based back-end running on nginx, also using letsencrypt certificates). As for code, it just a regular curl call which works on all but these two android versions.

However; after further testing I think is not related to Axmol as accessing the flask server via the webbrowser in the emulator results in net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH. I will investigate further but I guess people on ancient devices are just out of luck.