Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1080888ybh; Wed, 18 Mar 2020 14:43:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuC+9Au9ypmBWDjr87v2TpKFy1Q9PcTgJrk4QHfBmCFuvVjhxvGaGrxHvvPuaKWxzWyC6jY X-Received: by 2002:aca:4cc9:: with SMTP id z192mr41004oia.134.1584567782142; Wed, 18 Mar 2020 14:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584567782; cv=none; d=google.com; s=arc-20160816; b=F6HaFu2Fx/QqZXis++KAdozGWoZdZ2IusrapnVlOOJQGdp2SebMUkL5RpLU6s1D/Y7 ALLwf0JVITZNMHGmow3choKnEyebx5h7d9bbORPNkNnx8XIjg0JhPIJ7HIdBMdcZJOFe uxfzUp0YAC0teAXemSA0VpyQtjkF8Yk0Bw7n1EaO33I68eiIwGk31HPsr+e5LZW5PZ69 1vVrOvAH7QEQb9z4h/voy0ZHs9nCP5D5D23YfGKrv41/4tmKABFrinrYX30w34GkdwgV dv+uBvGPMNyetHrhnTQsKXzW5jXis7UDl6vA5r636gYI+Q018ys3E1OXBLYWq0qgMZ86 59Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature:dkim-filter; bh=OLZmYDkiQvs3u1GvR5c0MQQi01rmIE2Bh3XgwpIg5yA=; b=dwqVn+45VlItSOXRV9AaHzs7OFPaYuBfR36fTjaC4p9w7kvObgG7ae0siuN/ehqiDz g4xM0ko31oZ/OMjiTPR3Y0dqiqifBc3369MYt5XE7HyCCH4vj3IHywfR9u2RDXv5djJd IxzNV9z1hJTO6RNS1gwhWUXr6Z9yxWTWQtfFu5wAvjHHsX4ReIwdVSXI8Qk+soxeT2ka FY0Ampw+CbP1ovRj9NyZHYyZZXIlxTImiMGpj+djjxqARl3zKn5/9o0SlaybpmjoH/Ci T7h3YuDAHN9SBYe8pPJlfwSNYbipprfMMbC9AEtvxzgiYwkW1QguIvteLFtEv7PHKBVQ j8eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rosalinux.ru header.s=A1AAD92A-9767-11E6-A27F-AC75C9F78EF4 header.b=EFozWfUN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rosalinux.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si115675otq.99.2020.03.18.14.42.49; Wed, 18 Mar 2020 14:43:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rosalinux.ru header.s=A1AAD92A-9767-11E6-A27F-AC75C9F78EF4 header.b=EFozWfUN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rosalinux.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727195AbgCRVlv (ORCPT + 99 others); Wed, 18 Mar 2020 17:41:51 -0400 Received: from mail.rosalinux.ru ([195.19.76.54]:34312 "EHLO mail.rosalinux.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbgCRVlu (ORCPT ); Wed, 18 Mar 2020 17:41:50 -0400 X-Greylist: delayed 588 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Mar 2020 17:41:50 EDT Received: from localhost (localhost [127.0.0.1]) by mail.rosalinux.ru (Postfix) with ESMTP id 59136D6F76F95; Thu, 19 Mar 2020 00:32:01 +0300 (MSK) Received: from mail.rosalinux.ru ([127.0.0.1]) by localhost (mail.rosalinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vEBJrQ_agJiR; Thu, 19 Mar 2020 00:31:46 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.rosalinux.ru (Postfix) with ESMTP id ED54BD68A0074; Thu, 19 Mar 2020 00:31:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rosalinux.ru ED54BD68A0074 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rosalinux.ru; s=A1AAD92A-9767-11E6-A27F-AC75C9F78EF4; t=1584567106; bh=OLZmYDkiQvs3u1GvR5c0MQQi01rmIE2Bh3XgwpIg5yA=; h=To:From:Message-ID:Date:MIME-Version; b=EFozWfUN30D/226h7IZAyPnKysjfb5/TW6iRx1ekEq1nmPTVDV7/ZMt40AFGgNSVr q1BSkzqnB2coScnRPnWDajGI3Bu+YLKHuAg0EBFQ40SZV7bWXmCuzAEbXMYfH9yrmM BPHCmhi+EqX6Ibk6cQtABx4Wr2vorrtAppFyItvaK939ogUJjXg5ZB4QwWGldAcvdH 1MLUV54Y9AhWlgA0xYPJtJvRU9wLdEJsEe0BDF8+mLUMFNcxqKIve8iumQF7cP5wyg iU1ZmmTfd6sQ8H8juqOM/C3tIDjEaycAejTL5PP1f+gh6iUBzhEoUS9EClEe80B3C3 5rJnFV+k2MCtA== X-Virus-Scanned: amavisd-new at rosalinux.ru Received: from mail.rosalinux.ru ([127.0.0.1]) by localhost (mail.rosalinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Um9Klry3hGBe; Thu, 19 Mar 2020 00:31:45 +0300 (MSK) Received: from [192.168.1.173] (broadband-90-154-70-24.ip.moscow.rt.ru [90.154.70.24]) by mail.rosalinux.ru (Postfix) with ESMTPSA id BC344D688A072; Thu, 19 Mar 2020 00:31:45 +0300 (MSK) To: keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, Mikhail Novosyolov From: Mikhail Novosyolov Subject: sign-file: full functionality with modern LibreSSL Message-ID: Date: Thu, 19 Mar 2020 00:31:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: ru-RU Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current pre-release version of LibreSSL has enabled CMS support, and now sign-file is fully functional with it. See https://github.com/libressl-portable/openbsd/commits/master To test buildability with current LibreSSL: ~$ git clone https://github.com/libressl-portable/portable.git ~$ cd portable && ./autogen.sh ~$ ./configure --prefix=3D/opt/libressl ~$ make ~# make install Go to the kernel source tree and: ~$ gcc -I/opt/libressl/include -L /opt/libressl/lib -lcrypto -Wl,-rpath,/= opt/libressl/lib scripts/sign-file.c -o scripts/sign-file Fixes: f8688017 ("sign-file: fix build error in sign-file.c with libressl= ") Signed-off-by: Mikhail Novosyolov --- =C2=A0scripts/sign-file.c | 7 ++++--- =C2=A01 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/sign-file.c b/scripts/sign-file.c index fbd34b8e8f57..fd4d7c31d1bf 100644 --- a/scripts/sign-file.c +++ b/scripts/sign-file.c @@ -41,9 +41,10 @@ =C2=A0 * signing with anything other than SHA1 - so we're stuck with that= if such is =C2=A0 * the case. =C2=A0 */ -#if defined(LIBRESSL_VERSION_NUMBER) || \ -=C2=A0=C2=A0=C2=A0 OPENSSL_VERSION_NUMBER < 0x10000000L || \ -=C2=A0=C2=A0=C2=A0 defined(OPENSSL_NO_CMS) +#if defined(OPENSSL_NO_CMS) || \ +=C2=A0=C2=A0=C2=A0 ( defined(LIBRESSL_VERSION_NUMBER) \ +=C2=A0=C2=A0=C2=A0 && (LIBRESSL_VERSION_NUMBER < 0x3010000fL) ) || \ +=C2=A0=C2=A0=C2=A0 OPENSSL_VERSION_NUMBER < 0x10000000L =C2=A0#define USE_PKCS7 =C2=A0#endif =C2=A0#ifndef USE_PKCS7 --=20 2.20.1