Cocos2d-x Fix for OpenSSL problem

“Beginning July 11, 2016, Google Play will block publishing of any new apps or updates that use older versions of OpenSSL. If you’re using a 3rd party library that bundles OpenSSL, you’ll need to upgrade it to a version that bundles OpenSSL 1.02f/1.01r or higher.

The vulnerabilities were addressed in OpenSSL 1.02f/1.01r. The latest versions of OpenSSL can be downloaded here. To confirm your OpenSSL version, you can do a grep search for ($ unzip -p YourApp.apk | strings | grep “OpenSSL”).”

I’ve made a fix for the following issue, all you need to do is extract the zip file to “cocos2d\external” folder.
This will replace curl and open ssl libraries to:


Download fix from here: for Cocos2d-x 3.x for Cocos2d-x 2.x

Add a comment

Comments (17)

  1. Patrick, April 6, 2016
    hello, you have made this fix for what version of cocos? can it be use for 2.2.6? Reply
    • Obg1, April 7, 2016
      It is for version 3.X, but can be adapted to version 2.x too. Reply
    • Obg1, April 7, 2016
      I've updated the post with link for a fix for each Cocos2d-x version Reply
  2. itzo, April 7, 2016
    I tested this and replaced all the files in: cocos2dx/external/curl from the zip you provided. When I tested the APK, I get this: OpenSSL 1.0.1h 5 Jun 2014 OpenSSL does not seem to be updated. Am I doing something wrong? We have to replace all the files in CURL folder, right? Reply
    • Obg1, April 7, 2016
      What Cocos2d-x version are you using? Reply
      • itzo, April 8, 2016
        v 3.2 Reply
  3. hua, April 8, 2016
    very good! thanks Reply
  4. Ritu Sinha, April 8, 2016
    @Obg1 I am using Cocos2dxv3.0 final and i have updated the curl as per contents you provide here.The build is running correctly that time.But once i do Clean,build..It gives me error in AssestsManager.cpp where curl is included,it shows me not found and sometimes also give me error of file Reply
  5. Ritu Sinha, April 8, 2016
    Can you please suggest what i am doing wrong.Except replacing the files,anything else required to do??? Reply
    • Obg1, April 8, 2016
      What error are you getting?? Reply
      • Ritu Sinha, April 8, 2016
        I am getting error regarding curl library used in AssesstsManager.cpp that not found By replacing the in libcurl folder,i got the error:- *** Android NDK: Aborting . Stop. Reply
        • Ritu Sinha, April 8, 2016
          I am getting error regarding curl library used in AssesstsManager.cpp that curl.h not found . and By replacing the in libcurl folder,i got the error:- *** Android NDK: Aborting . Stop. Reply Reply
  6. Ritu Sinha, April 8, 2016
    @Obg1,I am getting all these with clean,build after updating libcurl.Only build does not give me the error. Can you please check with clean,build your demo project that if its working??? Thanks Reply
    • Obg1, April 8, 2016
      For me it is working well, I've checked it on Cocos2dx 3.10 and 2.1 and 2.0 versions. I've deleted the obj folder to make it do a clean rebuild. Please check that the curl.h path didn't change. Reply
      • Ritu Sinha, April 9, 2016
        Ok you have tested in v3.10 in which the cocos2dx folder structure is different as compared to v3.0,may be thats the problem,can you suggest something for v3.0 only as above that all versions have different folder structure Reply
  7. Ritu Sinha, April 9, 2016
    In v3.0,libcurl has the path-cocos2d-x-3.0alpha0-pre/cocos2dx/platform/third_party/android/prebuilt/libcurl and libcurl have 3 contents inside,libs folder and include folder and include contains curl with all .h files and libs have armeabi,armeabi-v7a,x86 folders As you provided the updated file here,i have replaced them as per the contents available in existing path. Please suggest if something new to do?? Reply
  8. itzo, May 22, 2016
    I am getting this error: 5 errors generated. make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/Classes/AppDelegate.o] Error 1 make: Leaving directory `/Users/itzo/Documents/Android_Apps/DiamondSlots/DiamondSlot1.2/TEST/' Traceback (most recent call last): File "./", line 159, in build(opts.ndk_build_param,opts.android_platform,opts.build_mode) File "./", line 146, in build do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode) File "./", line 82, in do_build raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") Exception: Build dynamic library for project [ /Users/itzo/Documents/Android_Apps/DiamondSlots/DiamondSlot1.2/TEST/ ] fails! Any ideas? I am using NDK r9d? If I am able to successfully build that to generate obj folder, I will be able to change the curl lib successfully! Reply

Add a comment

(it will not be shared)