Skip to contentSkip to conversation

sign-file: fix build error in sign-file.c with libressl

PATCH Applied John Crispin 2 participants 2 messages Dec 22, 2016 – Jan 12, 2017 Certificate handling

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sign-file: fix build error in sign-file.c with libressl

From: Felix Fietkau <[email protected]>

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.

---
 scripts/sign-file.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/sign-file.c +3 -1
index 53af6dc..7307fd4 100755
@@ -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
Signature · 1 line
1.7.10.4