summaryrefslogtreecommitdiffstats
path: root/scripts/sign-file.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-09 17:17:45 +0000
committerJames Morris <james.l.morris@oracle.com>2017-02-10 12:43:47 +1100
commitf86880175d0db2e3f2e27c24881dd9b395b0b920 (patch)
treef546bb0b8f8aed3578d55dbd36a4cc41b0e02016 /scripts/sign-file.c
parenta2a15479d617ebbab67c60b4eed02524536af780 (diff)
downloadlinux-f86880175d0db2e3f2e27c24881dd9b395b0b920.tar.gz
linux-f86880175d0db2e3f2e27c24881dd9b395b0b920.tar.bz2
linux-f86880175d0db2e3f2e27c24881dd9b395b0b920.zip
sign-file: fix build error in sign-file.c with libressl
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 <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'scripts/sign-file.c')
-rw-r--r--scripts/sign-file.c4
1 files changed, 3 insertions, 1 deletions
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