commit:     dee616e55bf3f2ced4f2f4688df60626ed2f6a29
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 23:10:07 2020 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Wed May 20 23:10:07 2020 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=dee616e5

sign-file: full functionality with modern LibreSSL

Bug: https://bugs.gentoo.org/717166

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README                             |  4 ++++
 2920_sign-file-patch-for-libressl.patch | 16 ++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/0000_README b/0000_README
index 3a37e9d..50aaa31 100644
--- a/0000_README
+++ b/0000_README
@@ -127,6 +127,10 @@ Patch:  
2910_TVP5150-Fix-build-issue-by-selecting-REGMAP-I2C.patch
 From:   https://bugs.gentoo.org/721096
 Desc:   VIDEO_TVP515 requies REGMAP_I2C to build.  Select it by default in 
Kconfig. See bug #721096. Thanks to Max Steel
 
+Patch:  2920_sign-file-patch-for-libressl.patch
+From:   https://bugs.gentoo.org/717166
+Desc:   sign-file: full functionality with modern LibreSSL
+
 Patch:  4567_distro-Gentoo-Kconfig.patch
 From:   Tom Wijsman <[email protected]>
 Desc:   Add Gentoo Linux support config settings and defaults.

diff --git a/2920_sign-file-patch-for-libressl.patch 
b/2920_sign-file-patch-for-libressl.patch
new file mode 100644
index 0000000..e6ec017
--- /dev/null
+++ b/2920_sign-file-patch-for-libressl.patch
@@ -0,0 +1,16 @@
+--- a/scripts/sign-file.c      2020-05-20 18:47:21.282820662 -0400
++++ b/scripts/sign-file.c      2020-05-20 18:48:37.991081899 -0400
+@@ -41,9 +41,10 @@
+  * signing with anything other than SHA1 - so we're stuck with that if such is
+  * the case.
+  */
+-#if defined(LIBRESSL_VERSION_NUMBER) || \
+-      OPENSSL_VERSION_NUMBER < 0x10000000L || \
+-      defined(OPENSSL_NO_CMS)
++#if defined(OPENSSL_NO_CMS) || \
++      ( defined(LIBRESSL_VERSION_NUMBER) \
++      && (LIBRESSL_VERSION_NUMBER < 0x3010000fL) ) || \
++      OPENSSL_VERSION_NUMBER < 0x10000000L
+ #define USE_PKCS7
+ #endif
+ #ifndef USE_PKCS7

Reply via email to