Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
android.testssl/ | 03-May-2024 | - | 419 | 306 | ||
apps/ | 03-May-2024 | - | 42,048 | 33,729 | ||
crypto/ | 03-May-2024 | - | 351,310 | 258,064 | ||
include/openssl/ | 03-May-2024 | - | 35,396 | 22,602 | ||
patches/ | 03-May-2024 | - | 1,294 | 1,175 | ||
ssl/ | 03-May-2024 | - | 56,598 | 41,127 | ||
Android.mk | D | 03-May-2024 | 424 | 13 | 4 | |
Apps.mk | D | 03-May-2024 | 1.8 KiB | 89 | 79 | |
CleanSpec.mk | D | 03-May-2024 | 4.1 KiB | 62 | 12 | |
Crypto.mk | D | 03-May-2024 | 17.5 KiB | 689 | 657 | |
MODULE_LICENSE_BSD_LIKE | D | 03-May-2024 | 0 | |||
NOTICE | D | 03-May-2024 | 6.1 KiB | 128 | 120 | |
README.android | D | 03-May-2024 | 3.6 KiB | 92 | 63 | |
Ssl.mk | D | 03-May-2024 | 2.7 KiB | 110 | 92 | |
android-config.mk | D | 03-May-2024 | 1 KiB | 28 | 7 | |
e_os.h | D | 03-May-2024 | 22.8 KiB | 735 | 516 | |
e_os2.h | D | 03-May-2024 | 10.2 KiB | 316 | 176 | |
import_openssl.sh | D | 03-May-2024 | 9.2 KiB | 293 | 202 | |
openssl.config | D | 03-May-2024 | 4.4 KiB | 255 | 245 | |
openssl.version | D | 03-May-2024 | 23 | 2 | 1 |
README.android
1OpenSSL on the Android platform. 2--- 3 4The code in this directory is based on $OPENSSL_VERSION in the file 5openssl.version. See patches/README for more information on how the 6code differs from $OPENSSL_VERSION. 7 8Porting New Versions of OpenSSL. 9-- 10 11The following steps are recommended for porting new OpenSSL versions. 12 131) Retrieve the appropriate version of the OpenSSL source from 14 www.openssl.org/source (in openssl-*.tar.gz file). Check the PGP 15 signature (found in matching openssl-*.tar.gz.asc file) with: 16 17 gpg openssl-*.tar.gz.asc 18 19 If the public key is not found, import the the one with the 20 matching RSA key ID from http://www.openssl.org/about/, using: 21 22 gpg --import # paste PGP public key block on stdin 23 242) Update the variables in openssl.config and openssl.version as appropriate. 25 At the very least you will need to update the openssl.version. 26 273) Run: 28 29 ./import_openssl.sh import openssl-*.tar.gz 30 314) If there are any errors, then modify openssl.config, openssl.version 32 and patches in patches/ as appropriate. You might want to use: 33 34 ./import_openssl.sh regenerate patches/*.patch 35 36 Repeat step 3. 37 385) Cleanup before building with: 39 40 m -j16 clean-libcrypto clean-libssl clean-openssl clean-ssltest 41 426) Build openssl from the external/openssl directory with: 43 44 mm -j16 snod && adb remount && adb sync system 45 46 If there are build errors, then patches/*.mk, openssl.config, or 47 android-config.mk may need updating. 48 497) Run tests to make sure things are working: 50 51 # Run local openssl tests 52 (cd android.testssl/ && ./testssl.sh) 53 # Build and sync libcore tests 54 (croot && cd libcore && mm -j16 snod && adb remount && adb sync) 55 # Run tests from libcore 56 (croot && vogar --classpath out/target/common/obj/JAVA_LIBRARIES/core-tests-support_intermediates/classes.jar --classpath out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jar javax.net.ssl tests.api.javax.net) 57 # Run tests from Harmony 58 (croot && vogar --classpath harmony_tests.jar tests.api.java.math.BigIntegerTest org.apache.harmony.tests.java.math) 59 # try an https website 60 adb shell am start https://online.citibank.com # confirm result in browser 61 62 The vogar tool can be found externally at http://code.google.com/p/vogar/ 63 Within Google it can be run with ~dalvik-prebuild/vogar/bin/vogar 64 65 harmony_tests.jar is built from Subversion http://harmony.apache.org/ 66 Within Google it can be found at ~dalvik-prebuild/bin/harmony_tests.jar 67 68 # You can also run openssl s_server as a test server on the device: 69 adb push ./android.testssl/CAss.cnf /sdcard/CAss.cnf 70 adb shell openssl req -config /sdcard/CAss.cnf -x509 -nodes -days 365 -subj '/C=US/ST=California/L=Mountain View/CN=localhost' -newkey rsa:1024 -keyout /sdcard/server.pem -out /sdcard/server.pem 71 adb shell openssl s_server -cert /sdcard/server.pem -www -verify 1 72 adb shell am start https://localhost:4433 # confirm result in browser 73 748) Do a full build before checking in: 75 76 m -j16 77 78Optionally, check whether build flags (located in android-config.mk 79need to be updated. Doing this step will help ensure that the 80compiled library is appropriately optimized for speed and size. To 81update build flags: 82 83a) source openssl.config 84b) tar -zxf openssl-*.tar.gz 85c) cd openssl-*/ 86d) ./Configure $CONFIGURE_ARGS 87e) examine Makefile and compare with ../android-config.mk 88f) modify ../openssl.config as appropriate and go to step 3) above. 89 90Alternatively, ."/import_openssl.sh import" now prints the 91post-Configure Makefile for review before deleting in on import. 92