Blame patches/sbsigntools_pre.local.patch

6168a7
diff -ru sbsigntools-0.9.3.orig/configure.ac sbsigntools/configure.ac
6168a7
--- sbsigntools-0.9.3.orig/configure.ac	2020-01-09 18:33:38.000000000 +0100
6168a7
+++ sbsigntools/configure.ac	2020-05-02 22:04:59.758305183 +0200
6168a7
@@ -63,32 +63,6 @@
6168a7
     [],
6168a7
     AC_MSG_ERROR([libuuid (from the uuid package) is required]))
6168a7
 
6168a7
-dnl gnu-efi headers require extra include dirs
6168a7
-EFI_ARCH=$(uname -m | sed 's/i.86/ia32/;s/arm.*/arm/')
6168a7
-AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" ])
6168a7
-
6168a7
-##
6168a7
-# no consistent view of where gnu-efi should dump the efi stuff, so find it
6168a7
-##
6168a7
-for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi ; do
6168a7
-    if test -e $path/crt0-efi-$EFI_ARCH.o; then
6168a7
-       CRTPATH=$path
6168a7
-    fi
6168a7
-done
6168a7
-if test -z "$CRTPATH"; then
6168a7
-   AC_MSG_ERROR([cannot find the gnu-efi crt path])
6168a7
-fi
6168a7
-
6168a7
-EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
6168a7
- -DEFI_FUNCTION_WRAPPER"
6168a7
-CPPFLAGS_save="$CPPFLAGS"
6168a7
-CPPFLAGS="$CPPFLAGS $EFI_CPPFLAGS"
6168a7
-AC_CHECK_HEADERS([efi.h], [], [], $EFI_INCLUDES)
6168a7
-CPPFLAGS="$CPPFLAGS_save"
6168a7
-AC_SUBST(EFI_CPPFLAGS, $EFI_CPPFLAGS)
6168a7
-AC_SUBST(EFI_ARCH, $EFI_ARCH)
6168a7
-AC_SUBST(CRTPATH, $CRTPATH)
6168a7
-
6168a7
 AC_CONFIG_FILES([Makefile src/Makefile lib/ccan/Makefile]
6168a7
-		[docs/Makefile tests/Makefile])
6168a7
+		[docs/Makefile])
6168a7
 AC_OUTPUT
6168a7
diff -ru sbsigntools-0.9.3.orig/docs/Makefile.am sbsigntools/docs/Makefile.am
6168a7
--- sbsigntools-0.9.3.orig/docs/Makefile.am	2020-01-09 18:33:38.000000000 +0100
6168a7
+++ sbsigntools/docs/Makefile.am	2020-05-02 22:12:41.441538721 +0200
f977a7
@@ -1,6 +1,5 @@
6168a7
 
f977a7
-man1_MANS = sbsign.1 sbverify.1 sbattach.1 sbvarsign.1 sbsiglist.1 \
f977a7
-		sbkeysync.1
6168a7
+man1_MANS = sbsign.1 sbverify.1 sbattach.1
6168a7
 
6168a7
 EXTRA_DIST = sbsign.1.in sbverify.1.in sbattach.1.in \
6168a7
 		sbvarsign.1.in sbsiglist.1.in
6168a7
diff -ru sbsigntools-0.9.3.orig/Makefile.am sbsigntools/Makefile.am
6168a7
--- sbsigntools-0.9.3.orig/Makefile.am	2020-01-09 18:33:38.000000000 +0100
6168a7
+++ sbsigntools/Makefile.am	2020-05-02 22:16:07.359375795 +0200
6168a7
@@ -1,2 +1,2 @@
6168a7
 
6168a7
-SUBDIRS = lib/ccan src docs tests
6168a7
+SUBDIRS = lib/ccan src
6168a7
diff -ru sbsigntools-0.9.3.orig/src/Makefile.am sbsigntools/src/Makefile.am
6168a7
--- sbsigntools-0.9.3.orig/src/Makefile.am	2020-01-09 18:33:38.000000000 +0100
6168a7
+++ sbsigntools/src/Makefile.am	2020-05-02 22:09:31.013544683 +0200
6168a7
@@ -1,5 +1,5 @@
6168a7
 
6168a7
-bin_PROGRAMS = sbsign sbverify sbattach sbvarsign sbsiglist sbkeysync
6168a7
+bin_PROGRAMS = sbsign sbverify sbattach
6168a7
 
6168a7
 coff_headers = coff/external.h coff/pe.h
6168a7
 AM_CFLAGS = -Wall -Wextra --std=gnu99
6168a7
diff -ru sbsigntools-0.9.3.orig/src/sbverify.c sbsigntools/src/sbverify.c
6168a7
--- sbsigntools-0.9.3.orig/src/sbverify.c	2020-01-09 18:33:38.000000000 +0100
6168a7
+++ sbsigntools/src/sbverify.c	2020-05-02 22:11:22.921541180 +0200
6168a7
@@ -56,7 +56,7 @@
6168a7
 #include <openssl/pem.h>
6168a7
 #include <openssl/x509v3.h>
6168a7
 
6168a7
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
6168a7
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
6168a7
 #define X509_OBJECT_get0_X509(obj) ((obj)->data.x509)
6168a7
 #define X509_OBJECT_get_type(obj) ((obj)->type)
6168a7
 #define X509_STORE_CTX_get0_cert(ctx) ((ctx)->cert)