From: Egor Bogatov Date: Wed, 6 May 2020 18:13:33 +0000 (+0300) Subject: Add basic OpenSSL support to Android (#35893) X-Git-Tag: submit/tizen/20210909.063632~8151 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=287a58a2cafbb9d07b2113b7921c89b44c3ca78e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Add basic OpenSSL support to Android (#35893) Temp solution to enable `System.Security.Cryptography.Native` for Android while we figure out how to build/consume it properly. #### Steps to enable: 1) Download and unzip `https://maven.google.com/com/android/ndk/thirdparty/openssl/1.1.1g-alpha-1/openssl-1.1.1g-alpha-1.aar` 2) Set these env variables: ``` export AndroidOpenSslHeaders="/Users/egorbo/prj/openssl-1.1.1g-alpha-1.aar/prefab/modules/ssl/include" export AndroidOpenSslCryptoLib="/Users/egorbo/prj/openssl-1.1.1g-alpha-1.aar/prefab/modules/crypto/libs/android.x86_64/libcrypto.so" export AndroidOpenSslLib="/Users/egorbo/prj/openssl-1.1.1g-alpha-1.aar/prefab/modules/ssl/libs/android.x86_64/libssl.so" ``` (make sure you use the right ABI in the paths, e.g. `android.x86_64` for `-arch x64` or `android.arm64-v8a` for `-arch arm64`) 3) build repo normally, e.g. ``` ./build.sh -os Android -subset Mono+Libs ``` I am preparing a PR to update the docs and will include these temp hints. --- diff --git a/eng/testing/tests.targets b/eng/testing/tests.targets index faaffc4..473b631 100644 --- a/eng/testing/tests.targets +++ b/eng/testing/tests.targets @@ -133,6 +133,14 @@ + + + + - - + + diff --git a/src/mono/netcore/sample/Android/Program.csproj b/src/mono/netcore/sample/Android/Program.csproj index 5c22424..51a153d 100644 --- a/src/mono/netcore/sample/Android/Program.csproj +++ b/src/mono/netcore/sample/Android/Program.csproj @@ -34,6 +34,15 @@ + + + + +