From patchwork Fri Jul 25 16:18:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robbie King X-Patchwork-Id: 34295 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9EBC020551 for ; Fri, 25 Jul 2014 16:18:35 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id v1sf15535263yhn.4 for ; Fri, 25 Jul 2014 09:18:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:thread-topic:thread-index :date:message-id:references:in-reply-to:accept-language:mime-version :cc:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-language:content-type:content-transfer-encoding; bh=wIxXpcVEMqh8YVD+IByRgOfvPe9hzsauLsRQ7E2V6Hg=; b=MLXx7XUkD8MFQdQlHmeImzN2PNskjgho8678h/5sV0CieqYMpST2yTaIYaGzp5C1u+ uxofjaW4mG4kq2IV8BbCEkuZ4G0XqfEdTKVZHWP6m2ACxIODFsNnzqALyaMxXo6SEqfX f+odL2d+ny+Z5o3ONOoDYn+FOKIn4dGsETsLGF3kiiZ3dfnCs5RE+gllnCfJ96t1qt8v RA0diGyznaKVRg+0TylQcU/uRCCwklYFC1kRZNPWqALefx+2LZ/rHuEBGZ5xtGOn9bbD rIWccn6224g9FjDm4X7xOzHmfyCYuBjDKfpRI6IMYkCiRkE8f2BErtIMTpwJBHVIHHWI jSdg== X-Gm-Message-State: ALoCoQnMOG2NOY4t3JWykjphoU+XVJMbkYSRDYcbzl4XWq4FVRUQkVwYw1xaCMOJ9gpCqsTYC4Sr X-Received: by 10.52.165.227 with SMTP id zb3mr7156674vdb.1.1406305115426; Fri, 25 Jul 2014 09:18:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.11 with SMTP id n11ls1251094qge.11.gmail; Fri, 25 Jul 2014 09:18:35 -0700 (PDT) X-Received: by 10.220.49.10 with SMTP id t10mr22389495vcf.34.1406305115290; Fri, 25 Jul 2014 09:18:35 -0700 (PDT) Received: from mail-vc0-x234.google.com (mail-vc0-x234.google.com [2607:f8b0:400c:c03::234]) by mx.google.com with ESMTPS id sx9si7844852vdb.2.2014.07.25.09.18.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 09:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::234 as permitted sender) client-ip=2607:f8b0:400c:c03::234; Received: by mail-vc0-f180.google.com with SMTP id ij19so7628547vcb.11 for ; Fri, 25 Jul 2014 09:18:35 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr18613519vdb.27.1406305115067; Fri, 25 Jul 2014 09:18:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp49877vcb; Fri, 25 Jul 2014 09:18:34 -0700 (PDT) X-Received: by 10.140.103.74 with SMTP id x68mr28563286qge.34.1406305114252; Fri, 25 Jul 2014 09:18:34 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id t38si17041966qge.119.2014.07.25.09.18.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 25 Jul 2014 09:18:34 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XAiCX-00017l-5S; Fri, 25 Jul 2014 16:18:33 +0000 Received: from alln-iport-8.cisco.com ([173.37.142.95]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XAiCR-00017g-PM for lng-odp@lists.linaro.org; Fri, 25 Jul 2014 16:18:27 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AikFABiC0lOtJA2I/2dsb2JhbABZgmokUlcEgnTHDQKHTQEZdxZ3hAMBAQEEAQIgEUUMBAIBCBEEAQEBAgIGHQMCAgImChQBCAgCBAENBQiIOgGneJccF4EsjUcnFhsHBoJyNoEbBZhYhEGSeINIbIEDQg X-IronPort-AV: E=Sophos;i="5.01,732,1400025600"; d="scan'208";a="64043871" Received: from alln-core-3.cisco.com ([173.36.13.136]) by alln-iport-8.cisco.com with ESMTP; 25 Jul 2014 16:18:22 +0000 Received: from xhc-rcd-x05.cisco.com (xhc-rcd-x05.cisco.com [173.37.183.79]) by alln-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id s6PGIMq6025445 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 25 Jul 2014 16:18:22 GMT Received: from xmb-aln-x01.cisco.com ([fe80::747b:83e1:9755:d453]) by xhc-rcd-x05.cisco.com ([173.37.183.79]) with mapi id 14.03.0123.003; Fri, 25 Jul 2014 11:18:22 -0500 From: "Robbie King (robking)" To: Anders Roxell , Taras Kondratiuk Thread-Topic: [lng-odp] [PATCH 0/3] ODP Crypto API Thread-Index: AQHPp2hO9Ygo2RbmbkCrR4VHtc3fJZuv3uAAgAEFDwCAAB++AP//wHow Date: Fri, 25 Jul 2014 16:18:21 +0000 Message-ID: References: <1406224439-24226-1-git-send-email-robking@cisco.com> <20140724182734.GA21709@8470w> <53D22B14.4030305@linaro.org> <20140725115532.GA22488@8470w> In-Reply-To: <20140725115532.GA22488@8470w> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.82.237.132] MIME-Version: 1.0 X-Topics: crypto patch Cc: "lng-odp@lists.linaro.org" Subject: Re: [lng-odp] [PATCH 0/3] ODP Crypto API X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Original-Sender: robking@cisco.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::234 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Language: en-US I agree we need to add something for cross compiling. My apologies for my limited knowledge of cross compiling. If the user builds/links against the latest openssl libcrypto from git, will it always work if the executable is then run on a system with a packaged openssl library? Thanks, Robbie -----Original Message----- From: Anders Roxell [mailto:anders.roxell@linaro.org] Sent: Friday, July 25, 2014 7:56 AM To: Taras Kondratiuk Cc: Robbie King (robking); lng-odp@lists.linaro.org Subject: Re: [lng-odp] [PATCH 0/3] ODP Crypto API 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 --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