curl-library
Re: Porting libcurl on Android with SSL Support
Date: Thu, 05 Jul 2012 03:14:58 +0200
Hi,
Am 04.07.2012 19:53, schrieb Tancho .:
> I have tried to port libcurl to android but ran into some issues, and
there's no porting needed - it runs out-of-the-box when you configure a
cross-compile, see f.e. here were I have a bunch of autobuilds, and also
with OpenSSL support:
http://curl.haxx.se/dev/builds.html
> so, I have successfully configured libcurl and it's compilable without
> SSL support, but when I link to OpenSSL I get the following errors :
>
> Compile thumb : curl <= curl_ntlm_core.c
> Compile thumb : curl <= curl_ntlm_msgs.c
> Prebuilt : libssl.so <= jni/include/precompiled/libssl/lib/
> StaticLibrary : libcurl.a
> Executable : curly
> jni/src/tool_paramhlp.c:321: error: undefined reference to 'getpass_r'
> jni/lib/ssluse.c:395: error: undefined reference to 'ENGINE_ctrl'
> jni/lib/ssluse.c:402: error: undefined reference to 'ENGINE_ctrl_cmd'
> jni/lib/ssluse.c:554: error: undefined reference to
> 'ENGINE_load_private_key'
> jni/lib/ssluse.c:1629: error: undefined reference to
> 'SSL_CTX_set_srp_username'
> jni/lib/ssluse.c:1633: error: undefined reference to
> 'SSL_CTX_set_srp_password'
> jni/lib/ssluse.c:697: error: undefined reference to
> 'ENGINE_load_builtin_engines'
> jni/lib/ssluse.c:724: error: undefined reference to 'ENGINE_cleanup'
> jni/lib/ssluse.c:774: error: undefined reference to 'ENGINE_by_id'
> jni/lib/ssluse.c:790: error: undefined reference to 'ENGINE_finish'
> jni/lib/ssluse.c:791: error: undefined reference to 'ENGINE_free'
> jni/lib/ssluse.c:794: error: undefined reference to 'ENGINE_init'
> jni/lib/ssluse.c:797: error: undefined reference to 'ENGINE_free'
> jni/lib/ssluse.c:817: error: undefined reference to 'ENGINE_set_default'
> jni/lib/ssluse.c:818: error: undefined reference to 'ENGINE_get_id'
> jni/lib/ssluse.c:822: error: undefined reference to 'ENGINE_get_id'
> jni/lib/ssluse.c:842: error: undefined reference to 'ENGINE_get_first'
> jni/lib/ssluse.c:842: error: undefined reference to 'ENGINE_get_next'
> jni/lib/ssluse.c:843: error: undefined reference to 'ENGINE_get_id'
> jni/lib/ssluse.c:991: error: undefined reference to 'ENGINE_finish'
> jni/lib/ssluse.c:992: error: undefined reference to 'ENGINE_free'
> collect2: ld returned 1 exit status
>
> and the reason is that OpenSSL was build with the macro OPENSSL_NO_ENGINE
> so I tried to enable the engine support but there were loads of
> #ifdef ANDROID
> #define NO_ENGINE
> #endif
> so I thought it was best if I don't mess with it.
is this an OpenSSL build which ships with some Android version? If so I
would strongly recommend that you build self a recent version from
OpenSSL source; what Android ships is usually 1.0.0a which is more than
2.5 years old and lacks of a bunch of important security fixes; so if
you are a serious coder and want to support SSL in terms of *secure*
then you have to build a recent OpenSSL and link that statically.
> so my question:
> Is it possible to build libcurl for Android with openssl which was built
> wit the OPENSSL_NO_ENGINE macro defined?
yes.
Gün.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-05