diff mbox

[0/3] ODP Crypto API

Message ID 20140725115532.GA22488@8470w
State New
Headers show

Commit Message

Anders Roxell July 25, 2014, 11:55 a.m. UTC
On 2014-07-25 13:01, Taras Kondratiuk wrote:
> On 07/24/2014 09:27 PM, Anders Roxell wrote:
> >Hi Robbie,
> >
> >On 2014-07-24 13:53, Robbie King wrote:
> >>Hello all,
> >>
> >>Per the latest ODP crypto discussions, here are patches
> >>to add the ODP crypto API header file as well as the
> >>linux-generic implementation.  The IPsec test application
> >>will be in a separate patch set.
> >
> >I like what you've done.
> >
> >Just some nits.
> >1. Copyright year 2013, change to 2014
> >2. Probably me that don't know how to do this but, how can I cross
> >    compile for arm?
> 
> Hi Anders,
> 
> I'm using OE's toolchain and sysroot which already have openssl in it.

Hi, I did it like this:


$ git clone git://git.openssl.org/openssl.git
$ cd openssl
Tested on both v8 and v7:

v8
$ ./Configure linux-aarch64 --cross-compile-prefix=aarch64-linux-gnu-
--prefix=/home/anders/src/install-openssl-aarch64
$ make
$ make install

v7:
$ ./Configure linux-generic32 --cross-compile-prefix=arm-linux-gnueabihf-
--prefix=/home/anders/src/install-openssl
$ make
$ make install


added this patch ontop of Robbbies three patches:
$ git df



building ODP v8:
$ ./configure --host=aarch64-linux-gnu
--with-openssl-path=/home/anders/src/install-openssl-aarch64
$ make

building ODP v7:
$ ./configure --host=arm-linux-gnueabihf
--with-openssl-path=/home/anders/src/install-openssl
$ make


Robbie we need to add this and probably something in the README howto
build openssl right?

Cheers,
Anders
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 95d5bdf..8cf4a83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,10 +90,18 @@  AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS"
 # Check for openssl availability
 ##########################################################################
 
+AC_ARG_WITH([openssl-path],
+AC_HELP_STRING([--with-openssl-path=DIR Path to openssl libs and headers],
+               [(or in the default path if not specified).]),
+[OPENSSL_PATH=$withval
+AM_CFLAGS="$AM_CFLAGS -I$OPENSSL_PATH/include"
+AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib"
+],[
 AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
              [AC_MSG_FAILURE([can't find openssl crypto lib])])
 AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], [],
              [AC_MSG_FAILURE([can't find openssl crypto headers])])
+   ])
 
 ##########################################################################
 # Default warning setup