-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Use Android SDK instead of OpenSSL where possible (#43740)
This PR redirects all RandomNumberGenerator, MD5, Sha1-512, HMAC and AES APIs to use Android SDK instead of OpenSSL.
- Loading branch information
Showing
5 changed files
with
695 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/libraries/Native/Unix/System.Security.Cryptography.Native.Android/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
project(System.Security.Cryptography.Native.Android C) | ||
|
||
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments) | ||
add_compile_options(-Wno-unused-parameter) | ||
add_compile_options(-Wno-unused-variable) | ||
|
||
set(NATIVECRYPTO_SOURCES | ||
android_security.c | ||
) | ||
|
||
add_library(System.Security.Cryptography.Native.Android | ||
SHARED | ||
${NATIVECRYPTO_SOURCES} | ||
${VERSION_FILE_PATH} | ||
) | ||
|
||
add_library(System.Security.Cryptography.Native.Android-Static | ||
STATIC | ||
${NATIVECRYPTO_SOURCES} | ||
) | ||
|
||
set_target_properties(System.Security.Cryptography.Native.Android-Static PROPERTIES OUTPUT_NAME System.Security.Cryptography.Native.Android CLEAN_DIRECT_OUTPUT 1) | ||
|
||
target_link_libraries(System.Security.Cryptography.Native.Android | ||
-llog | ||
) | ||
|
||
# TODO: Use "System.Security.Cryptography.Native.Android" name (will require a lot of csproj changes here and there) | ||
set_target_properties(System.Security.Cryptography.Native.Android PROPERTIES OUTPUT_NAME "System.Security.Cryptography.Native.OpenSsl") | ||
|
||
install_with_stripped_symbols (System.Security.Cryptography.Native.Android PROGRAMS .) | ||
install (TARGETS System.Security.Cryptography.Native.Android-Static DESTINATION .) |
Oops, something went wrong.