1 OpenSSL on the Android platform. 2 --- 3 4 The code in this directory is based on $OPENSSL_VERSION in the file 5 openssl.config, and some backported OpenSSL code in crypto/0.9.9-dev. 6 See patches/README for more information on how the code differs from 7 $OPENSSL_VERSION. 8 9 Porting New Versions of OpenSSL. 10 -- 11 12 The following steps are recommended for porting new OpenSSL versions. 13 14 1) Retrieve the appropriate version of the OpenSSL source from 15 www.openssl.org/source (in openssl-*.tar.gz file). Check the PGP 16 signature (found in matching openssl-*.tar.gz.asc file) with: 17 18 gpg openssl-*.tar.gz 19 20 If the public key is not found, import the the one with the 21 matching RSA key ID from http://www.openssl.org/about/, using: 22 23 gpg --import # paste PGP public key block on stdin 24 25 2) Update the variables in openssl.config and openssl.version as appropriate. 26 At the very least you will need to update the openssl.version. 27 28 3) Run: 29 30 ./import_openssl.sh import openssl-*.tar.gz 31 32 4) If there are any errors, then modify openssl.config, openssl.version 33 and patches in patches/ as appropriate. You might want to use: 34 35 ./import_openssl.sh regenerate patches/*.patch 36 37 Repeat step 3. 38 39 5) Cleanup before building with: 40 41 m -j16 clean-openssl clean-libcrypto clean-libssl 42 43 6) Build openssl from the external/openssl directory with: 44 45 mm -j16 46 47 If there are build errors, then patches/*.mk, openssl.config, or 48 android-config.mk may need updating. 49 50 7) Run tests to make sure things are working: 51 52 (cd android.testssl/ && ./testssl.sh) 53 adb shell run-core-tests tests.xnet.AllTests 54 55 8) Do a full build before checking in: 56 57 m clobber && m -j16 58 59 Optionally, check whether build flags (located in android-config.mk 60 need to be updated. Doing this step will help ensure that the 61 compiled library is appropriately optimized for speed and size. To 62 update build flags: 63 64 a) source openssl.config 65 b) tar -zxf openssl-*.tar.gz 66 c) cd openssl-*/ 67 d) ./Configure $CONFIGURE_ARGS 68 e) examine Makefile and compare with ../android-config.mk 69 f) modify ../openssl.config as appropriate and go to step 3) above. 70 71 Alternatively, ."/import_openssl.sh import" now prints the 72 post-Configure Makefile for review before deleting in on import. 73