0

I would like to know is openssl and curl are a part of android core .. becoz I have seen in many forums where users are trying build the openssl and curl for android ndk and use in there ..

Why do users go with their own build?

indra
  • 832
  • 4
  • 17
  • 33

2 Answers2

2

Android comes with /system/lib/libssl.so and /system/lib/libcrypto.so, which are ported from www.openssl.org. For example, the 4.0r1 (ICS) build includes version 1.0.0e. These libraries may not expose all the features of OpenSSL, though.

As for curl, look in Using cURL in Android for references.

Community
  • 1
  • 1
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • Due to my large extra include in the openssl crypto I have to include them as library in my project .. So as first step I tested simple curl code for http GET which can use the libcurl.so , now How to use the openssl library(libssl.so,libcrypto.so) in the curl code to try the https .. – indra Sep 08 '12 at 18:40
  • Try to download the AOSP source tree (or only the openssl part from it) and see if it gives you all you need to compile curl for https. – Alex Cohn Sep 08 '12 at 20:16
  • Hi , you mean to say android opensource project ..if so I have downloaded the open source tree http://source.android.com/source/downloading.html ,. but I dont know how to plug that in to curl part – indra Sep 09 '12 at 08:33
  • http://stackoverflow.com/questions/11330180/porting-libcurl-on-android-with-ssl-support has it all explained. As Tancho says, Andorid comes with its own OpenSSL, but there is no harm building another one. – Alex Cohn Sep 09 '12 at 12:23
  • I went through the above link but I could not understand how this line from that "next you need to add them to the path LD_LIBRARY path so that the configure script can see them and configure cURL correctly. " from these lines its bit confusing that in the configure script has author included the libssl.so and libcrpto.so (which are built using ndk-build ) or he included these shared library in the android.mk which is written for the curl application url.c . ? – indra Sep 09 '12 at 13:28
  • You better ask him, but my understanding *(I did not try to reproduce all steps after him)* is that you should set LD_LIBRARY_PATH to include the path to these two shared objects. See http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html for explanation of what LD_LIBARAY_PATH is. – Alex Cohn Sep 09 '12 at 14:03
  • okay I'll try to include them in the configure script itself and try ..will update the result here – indra Sep 09 '12 at 16:17
0

They're not. On the other hand, both cryptographic primitives in the scope of OpenSSL and an HTTP stack are a part of Android API on the Java side.

Why do folks roll their own? Probably to migrate legacy C/C++ code, rather than rewrite into reflected Java calls. Those are ugly.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • ok that's good from the android side ..but I could not find any application with openssl for the android . and in case user needs to add his own cryptography then how user can go with android java part – indra Sep 05 '12 at 17:55
  • For Java-side crypto, check out [the namespace java.security](http://developer.android.com/reference/java/security/package-summary.html). It's all there - symmetric cyphers, asymmetric ones, hashes, digital signing, etc. – Seva Alekseyev Sep 05 '12 at 17:58
  • 1
    A good information .. From devolper info I came to know that android provides a EllipticCurve (ecc) secure but I want to know does android supports the AES-CCM ECC Cipher Suites for TLS ..? how to get this information .. – indra Sep 06 '12 at 06:33