OK, so finally it worked :) Just download Android source, compile it targeting the ARM architecture. Android has openssl in PATH_TO_ANDROID_BUILD/external/openssl put you code in the appropriate place, compile, push it to your android device and run
No need for Code Sourcery Also, I don't think NDK is useful in this case as it doesn't include OpenSSL support at this point. On Mon, Jun 20, 2011 at 2:35 PM, Nahid Alam <sha...@gmail.com> wrote: > > > On Mon, Jun 20, 2011 at 2:17 PM, Dave Thompson <dthomp...@prinpay.com>wrote: > >> > From: owner-openssl-us...@openssl.org On Behalf Of Nahid Alam >> > Sent: Saturday, 18 June, 2011 19:00 >> >> > So I cross compiled OpenSSL following the link >> > http://www.crosscompile.org/static/pages/OpenSSL.html >> >> That uses the 'dist' config with minimal tool changes, >> which does static libraries (presumably) because there >> is no single portable way to do shared libraries. >> The only Configure case I see for ARM is linux-armv4 >> and it does do linux-shared, but I have no idea if that >> works correctly on your target, or if you even want it. >> > > >Can you please share how to do it? > >> >> > And used the following command >> > $ arm-none-linux-gnueabi-gcc -Wall -I/PATH_TO_INCLUDE_HEADER >> > -L/PATH_TO_CROSS_COMPILED_OpenSSL_LIB -lssl -lcrypto -o test test.c >> > But getting the errors: >> > openssl-arm-aes.c: In function 'main': >> > openssl-arm-aes.c:44:10: warning: unused variable 'e' >> > /tmp/ccaF9kYf.o: In function `time_aes': >> > openssl-arm-aes.c:(.text+0x1cc): undefined reference to >> `EVP_CIPHER_CTX_init' >> <snip rest> >> > Looks like I am missing something really silly. Any suggestion? >> >> And most C implementations including gcc at least for >> a static library, the library must be in the (linker) >> command line AFTER the module(s) that reference it. >> Also you don't need -lssl for EVP_* (but it doesn't hurt). >> >> But gcc (and binutils) should display your actual source >> filename, allegedly 'test.c'. Unless you just changed >> 'openssl-arm-aes.c' to 'test.c' for posting. >> > > > Yes, I just put test.c to reduce the length of the command :) > >> >> >> >> ______________________________________________________________________ >> OpenSSL Project http://www.openssl.org >> User Support Mailing List openssl-users@openssl.org >> Automated List Manager majord...@openssl.org >> > > > > -- > Regards > Nahid > > > -- Regards Nahid