在 Android NDK 上构建 OpenSSL

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2952572/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:02:11  来源:igfitidea点击:

Building OpenSSL on Android NDK

androidjava-native-interfaceopensslandroid-ndkdatagram

提问by Soumya Simanta

I want to use DTLS (on OpenSSL) using JNI on Android 2.1/2.2.

我想在 Android 2.1/2.2 上使用 JNI 使用 DTLS(在 OpenSSL 上)。

Can someone help me get started (tutorials, howto, pointers etc) with building OpenSSL for Android (2.1/2.2) using the Android NDK?

有人可以帮助我开始使用 Android NDK 为 Android (2.1/2.2) 构建 OpenSSL(教程、操作方法、指针等)吗?

Anything important that I should be aware of before doing it.

在做之前我应该​​知道的任何重要的事情。

Thanks.

谢谢。

回答by kost

I guess you don't need help with basic building of programs and OpenSSL.

我想你不需要帮助来构建基本的程序和 OpenSSL。

For specifics of Android and OpenSSL, take a look at Fries's GitHub repository called android-external-openssl.

有关 Android 和 OpenSSL 的详细信息,请查看 Fries 名为 android-external-openssl 的 GitHub 存储库。

Take a look especially at README located here: http://github.com/fries/android-external-openssl/blob/master/README.android

特别看一下位于此处的自述文件:http: //github.com/fries/android-external-openssl/blob/master/README.android

There you have step by step instructions on how to build OpenSSL on Android.

那里有关于如何在 Android 上构建 OpenSSL 的分步说明。

回答by Hans-Christoph Steiner

I've just finished a new fork of the current official Android openssl and got it building with ndk-buildfrom NDKr5b. I tried to make it as easy as possible to build. It doesn't build the ARMv4 assemblystuff yet, it was failing, so any help with that would be most appreciated. Here's the git repo:

我刚刚完成了当前官方 Android openssl 的一个新分支,并使用ndk-buildNDKr5b构建了它。我试图让它尽可能容易构建。 它尚未构建 ARMv4 程序集的东西,它失败了,因此非常感谢您对此的任何帮助。这是 git 仓库:

https://github.com/eighthave/openssl-android

https://github.com/eighthave/openssl-android

just run ndk-buildin openssl-android, and you should have libs/armeabi/libcrypto.soand libs/armeabi/libssl.so

只要跑ndk-build进去openssl-android,你应该有libs/armeabi/libcrypto.solibs/armeabi/libssl.so

EDIT: There is a new link for the latest version of this project:

编辑:此项目的最新版本有一个新链接:

https://github.com/guardianproject/openssl-android

https://github.com/guardianproject/openssl-android

回答by NoAngel

1.0.1s OpenSSL NDK, building it now, after received warning from Google. Here You go,

1.0.1s OpenSSL NDK,在收到谷歌警告后立即构建。干得好,

https://github.com/edwardlujunneng/openssl_android_build

https://github.com/edwardlujunneng/openssl_android_build

It's not my repository, but I found it useful for anyone who will some day come here and look for it.

这不是我的存储库,但我发现它对有一天会来这里寻找它的任何人都很有用。