Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 1 | OpenSSL on the Android platform. |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 2 | --- |
| 3 | |
Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 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. |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 6 | |
Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 7 | Porting New Versions of OpenSSL. |
| 8 | -- |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 9 | |
| 10 | The following steps are recommended for porting new OpenSSL versions. |
| 11 | |
Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 12 | 1) Retrieve the appropriate version of the OpenSSL source from |
| 13 | www.openssl.org/source (in tar.gz format) |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 14 | |
Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 15 | 2) Update the variables in openssl.config as appropriate |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 16 | |
Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 17 | 3) Run ./import_openssl.sh openssl-*.tar.gz |
| 18 | |
| 19 | 4) If there are any errors, then modify openssl.config, openssl.version |
| 20 | and patches in patches/ as appropriate. Repeat step 3. |
| 21 | |
| 22 | 5) From the root of the android source tree, build openssl. For |
| 23 | example, on the dream platform, run make |
| 24 | out/target/product/dream/obj/EXECUTABLES/openssl_intermediates/LINKED/openssl |
| 25 | |
| 26 | If there are build errors, then patches/*.mk, openssl.config, or |
| 27 | android-config.mk may need updating. |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 28 | |
| 29 | |
Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 30 | Optionally, check whether build flags (located in android-config.mk |
| 31 | need to be updated. Doing this step will help ensure that the |
| 32 | compiled library is appropriately optimized for speed and size. To |
| 33 | update build flags: |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 34 | |
Nagendra Modadugu | e45f106 | 2009-09-30 11:36:48 -0700 | [diff] [blame^] | 35 | a) source openssl.config |
| 36 | b) tar -zxf openssl-*.tar.gz |
| 37 | c) cd openssl-*/ |
| 38 | d) ./Configure $CONFIGURE_ARGS |
| 39 | e) examine Makefile and compare with ../android-config.mk |
| 40 | f) modify ../openssl.config as appropriate and go to step 3) above. |
The Android Open Source Project | 656d9c7 | 2009-03-03 19:30:25 -0800 | [diff] [blame] | 41 | |