Because of the heartbleed issue in some versions of OpenSSL, I need to update my OpenSSL version to openssl-1.0.1g. Does it has support for android platform? If yes, can somebody suggest me about the building procedures? I couldn't compile the source for android platform.
Any kind suggestion is highly appreciated.
Note: I will use openssl for android-ndk
Yes.
setenv-android.sh
ANDROID_NDK_ROOT
is setANDROID_SDK_ROOT
is setsetenv-android.sh
, and ensure_ANDROID_NDK
,_ANDROID_EABI
and_ANDROID_API
suit your tasteRun the following commands (note the leading dot when running
setenv-android.sh
)$ . ./setenv-android.sh
$ cd openssl-1.0.1g/
$ perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org
$ ./config shared -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine --openssldir=/usr/local/ssl/$ANDROID_API
$ make all
$ sudo -E make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib
After the install, your Android OpenSSL will be located in, for example,
/usr/local/ssl/android-18
.Note: Android's Zygote is like Linux/Unix
init
. All processes inherit from it. The problem is, Zygote loads OpenSSL and its probably a down level version. So you will have to create a wrapper shared object that statically links to OpenSSL. Your program will call into your wrapper shared object to avoid the already-mapped-in and down level version of OpenSSL.