SSL Support?


Does the curl implementation on cocos support https protocols? I attempted to modify the CurlTest class file with the following:

curl_easy_setopt(curl, CURLOPT_URL, "https://..."); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);

But wound up getting ‘CURLE_UNSUPPORTED_PROTOCOL’ returned.

Am I missing a step? Or is there no support for SSL in the current version?


I think it is not supported.
When building libcurl for android, there is an error if CURLE_UNSUPPORTED_PROTOCOL is turned on.


I found the same problem.

Curl libs in cocos not supported SSL. For windows its easy to download binary package with SSL (

But for Android I didnt find.

Do you have somebody this binary for download?

Do you solve your problem?

Can you share you android projekt for Curl library? I will try to recompile it with SSL support.

Thanks for help.


You can refer [[How to compile libcurl]].


Thanks to point me on how to. But its really hard to compile it (windows with cygwin).

In this time I am not able to compile basic version without SSL. Iam end on this error.

checking for C compiler default output file name...
configure: error: in `/cygdrive/c/work/tools/android-ndk-r7/sources/external/curl':
configure: error: C compiler cannot create executables

C:\work\tools\android-ndk-r7\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:50:23: error: sys/cdefs.h: No such file or directory
C:\work\tools\android-ndk-r7\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed/stdio.h:51:24: error: sys/_types.h: No such file or directory

Can you please help me with some details?

1.There is SDK_ROOT its really SDK not NDK?
2.Which is full path of “external/curl/ in the Android source tree”?
3.I need some extra android sources, that not included in NDK?
4.Did you try to compile it with SSL support? (Can you try it?)

Thanks for your help. I urgently need cUrl with SSL.



I build it with Android building system, not NKD.
I think you should do it on ubuntu.


I instaled uBuntu downloaded Android building system.

After run, script ends with error, that cant found path to $SDK_ROOT/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/…/lib/gcc/arm-eabi/4.4.0/interwork.
It looks like in current Android build system doesnt exists.

So I change it to $SDK_ROOT/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/…/lib/gcc/arm-eabi/4.4.0/thumb/android.
But it ends with errror “undefined reference to ‘fopen’” (ferror, fclose, *isthreaded,*aeabi_unwind_cpp_pr0).

Can somebody help with building under new Android building system?




Did you ever get this working. I found the solution was to make sure you are pointing to a clib

L$SDK_ROOT/platforms/android-14/arch-arm/usr/liblc lmldl

Now I am stuck with this message

./obj/local/armeabi/curl.a: could not read symbols: Archive has no index; run ranlib to add one

It seems that I am missing some objects or linking the wrong objects in the final lib


Any progress on ssl https libcurl? Didn’t want to make a new post for it :slight_smile: