GithubHelp home page GithubHelp logo

ozzie00 / openssl-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guardianproject/openssl-android

0.0 3.0 0.0 10.17 MB

a version of the official Android openssl setup to build standalone for use in app

Home Page: http://guardianproject.info/

License: Other

Makefile 0.74% Shell 0.21% Perl 7.48% C 85.98% C++ 2.26% Assembly 3.28% eC 0.03% Objective-C 0.02%

openssl-android's Introduction

OpenSSL on the Android platform.
---

The code in this directory is based on $OPENSSL_VERSION in the file
openssl.version. See patches/README for more information on how the
code differs from $OPENSSL_VERSION.

Porting New Versions of OpenSSL.
--

The following steps are recommended for porting new OpenSSL versions.

1) Retrieve the appropriate version of the OpenSSL source from
   www.openssl.org/source (in openssl-*.tar.gz file). Check the PGP
   signature (found in matching openssl-*.tar.gz.asc file) with:

     gpg openssl-*.tar.gz.asc

   If the public key is not found, import the the one with the
   matching RSA key ID from http://www.openssl.org/about/, using:

     gpg --import # paste PGP public key block on stdin

2) Update the variables in openssl.config and openssl.version as appropriate.
   At the very least you will need to update the openssl.version.

3) Run:

     ./import_openssl.sh import openssl-*.tar.gz

4) If there are any errors, then modify openssl.config, openssl.version
   and patches in patches/ as appropriate.  You might want to use:

     ./import_openssl.sh regenerate patches/*.patch

   Repeat step 3.

5) Cleanup before building with:

     m -j16 clean-libcrypto clean-libssl clean-openssl clean-ssltest

6) Build openssl from the external/openssl directory with:

     mm -j16 snod && adb sync system

   If there are build errors, then patches/*.mk, openssl.config, or
   android-config.mk may need updating.

7) Run tests to make sure things are working:

     # Run local openssl tests
     (cd android.testssl/ && ./testssl.sh)
     # Build and sync libcore tests
     (croot && cd libcore && mm -j16 snod && adb remount && adb sync)
     # Run tests from libcore
     (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)
     # Run tests from Harmony
     (croot && vogar --classpath harmony_tests.jar tests.api.java.math.BigIntegerTest org.apache.harmony.tests.java.math)
     # try an https website
     adb shell am start https://online.citibank.com # confirm result in browser

     The vogar tool can be found externally at http://code.google.com/p/vogar/
     Within Google it can be run with ~dalvik-prebuild/vogar/bin/vogar

     harmony_tests.jar is built from Subversion http://harmony.apache.org/
     Within Google it can be found at ~dalvik-prebuild/bin/harmony_tests.jar

     # You can also run openssl s_server as a test server on the device:
     adb push ./android.testssl/CAss.cnf /sdcard/CAss.cnf
     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
     adb shell openssl s_server -cert /sdcard/server.pem -www -verify 1
     adb shell am start https://localhost:4433 # confirm result in browser

8) Do a full build before checking in:

     m -j16

Optionally, check whether build flags (located in android-config.mk
need to be updated.  Doing this step will help ensure that the
compiled library is appropriately optimized for speed and size.  To
update build flags:

a) source openssl.config
b) tar -zxf openssl-*.tar.gz
c) cd openssl-*/
d) ./Configure $CONFIGURE_ARGS
e) examine Makefile and compare with ../android-config.mk
f) modify ../openssl.config as appropriate and go to step 3) above.

Alternatively, ."/import_openssl.sh import" now prints the
post-Configure Makefile for review before deleting in on import.

openssl-android's People

Contributors

bdcgoogle avatar eighthave avatar kruton avatar egnor avatar dougkwan avatar enh-google avatar jserv avatar

Watchers

Oz avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.