From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752788AbdBIRSS (ORCPT ); Thu, 9 Feb 2017 12:18:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48614 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbdBIRSK (ORCPT ); Thu, 9 Feb 2017 12:18:10 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 1/3] sign-file: fix build error in sign-file.c with libressl From: David Howells To: jmorris@namei.org Cc: linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, John Crispin , Felix Fietkau Date: Thu, 09 Feb 2017 17:17:45 +0000 Message-ID: <148666066539.8529.8727318912050419707.stgit@warthog.procyon.org.uk> In-Reply-To: <148666065805.8529.13153246197340248894.stgit@warthog.procyon.org.uk> References: <148666065805.8529.13153246197340248894.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 09 Feb 2017 17:17:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Fietkau The sign-file tool failed to build against libressl. Fix this by extending the PKCS7 check and thus making sign-file link against libressl without an error. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau Signed-off-by: David Howells --- scripts/sign-file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/sign-file.c b/scripts/sign-file.c index 19ec468b1168..fbd34b8e8f57 100644 --- a/scripts/sign-file.c +++ b/scripts/sign-file.c @@ -41,7 +41,9 @@ * signing with anything other than SHA1 - so we're stuck with that if such is * the case. */ -#if OPENSSL_VERSION_NUMBER < 0x10000000L || defined(OPENSSL_NO_CMS) +#if defined(LIBRESSL_VERSION_NUMBER) || \ + OPENSSL_VERSION_NUMBER < 0x10000000L || \ + defined(OPENSSL_NO_CMS) #define USE_PKCS7 #endif #ifndef USE_PKCS7