0

I'm making an Android application in which I need to use SSL but it is causing problems like

cannot call unresolved function EC_get_builtin_curves

I searched for a solution to this problem and found out that I need to provide SSL library with the application on my own. I don't know how to build OpenSSL for Android arm. Can somebody help? Thanks in advance.

Farhan Haider
  • 1,244
  • 1
  • 13
  • 22
  • You don't have `libcrypto`, which is one of OpenSSL dependencies, hence the error. – Andrejs Cainikovs Jun 08 '17 at 13:45
  • OKay so or that I must provide libcrypto with my application and how do I get libcrypto? If I have to build OpenSsl myself can you guide me how can I build it? – Farhan Haider Jun 08 '17 at 20:11
  • It's open source: download, extract, build. – Andrejs Cainikovs Jun 08 '17 at 20:32
  • *"If I have to build OpenSsl myself can you guide me how can I build it?"* - I believe you can use BoringSSL. Its [Google's port of OpenSSL](https://www.imperialviolet.org/2015/10/17/boringssl.html). If you still want to build it yourself, then see [OpenSSL and Android](https://wiki.openssl.org/index.php/Android) on the OpenSSL wiki. – jww Jun 09 '17 at 09:34
  • Also see [Unresolved Functions While Working With QSslSocket](https://stackoverflow.com/q/10846536/608639), [Linking error: libQt5Network.so: undefined reference to `EC_curve_nist2nid'](https://stackoverflow.com/q/35627998/608639), [Linker errors in libqt5network.so](https://stackoverflow.com/q/35141955/608639) and [Why libQt5Network.so undefined reference to OpenSSL on iOS?](https://stackoverflow.com/q/44449617/608639) – jww Jun 09 '17 at 09:34
  • You should ask a specific question for a particular problem. Since Stack Overflow hides the Close reason from you: *"Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it."* – jww Jun 09 '17 at 09:39

2 Answers2

0

Thanks everyone for suggesting solution. For me the easiest solution was to get pre-built OpenSSL libraries from here and package them in the APK. Now everything works fine.

Farhan Haider
  • 1,244
  • 1
  • 13
  • 22
0

i just run into the same trouble. And i spent a lot of time to try to build libcrypto.so and libss.so in windows with Cygwin and nothing works.

Until, i found this script https://github.com/akontsevich/openssl-android-build, it worked perfectly on Ubuntu18.10, Android NDK r18b and openssl 1.0.2o

Hope that saves some time.

LE Xuan Hung
  • 51
  • 1
  • 6