I'm currently trying to get my Cocos2D-X project to connect to my server through SSL and I got it to work on iOS without a lot of issues, however on Android I'm not able to even get OpenSSL to compile.. I've searched on Google quite a lot but all posts either keep re-directing me to HTTPS related posts (which this is not, I'm not using HTTP in any way shape or form here, purely OpenSSL), posts on how to do it with the standard Android SDK in Java or posts which just aren't helpful at all.
Can someone please show me how I can compile the Android version of this game and get it to connect to my server?
Had a problem close to your. Every Android OS has libssl and libcrypto libraries that part of OpenSSL. But them not included in NDK for using them. So you can a little bit modify your NDK by copying *so files from the phone.
$adb pull /system/lib/libssl.so /myndk/platforms/android-14/arch-arm/usr/lib
$adb pull /system/lib/libcrypto.so /myndk/platforms/android-14/arch-arm/usr/lib
where /myndk is path to your NDK, android-14 - your current platform
Also copy *.h files from openssl sources to /myndk/platforms/android-14/arch-arm/usr/include folder. Also add to this folder the next file - openssl/opensslconf.h (you could found it in internet or configure from source openssl) These files needed only at compile time. Once compiled your App will get the libraries from the phone.
Also do not forget add -lssl -lcrypto options in jni/Application.mk file for APP_LDFLAGS section
APP_LDFLAGS := -latomic -lssl -lcrypto