cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Porting libcurl on Android with SSL Support

From: Tancho . <smarkovik_at_gmail.com>
Date: Thu, 5 Jul 2012 10:46:29 +0200

Please find my responce is inline ...
Tancho

On Thu, Jul 5, 2012 at 3:14 AM, Guenter <lists_at_gknw.net> wrote:

> 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<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.
>
> The version is not the stock version, but it's not the latest one, I
believe it's a few months old, I just decided to use that one since it
already had all the stuff inplace for android (the guy that made the repo
copied all the google changes to make it compatible with android's build)
but even compiling it from source is not an issue.. And I agree that this a
static build is the way to go.

>
> so my question:
>> Is it possible to build libcurl for Android with openssl which was built
>> wit the OPENSSL_NO_ENGINE macro defined?
>>
> yes.
>
Please share your thoughts, I was more interested in the how rather than
the if in this question :)
How do I disable OpenSSL engine support in curl and still be able to make
https calls?

>
> Gün.
>
>
>
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-05