1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
diff -ru sbsigntools-0.9.3.orig/configure.ac sbsigntools/configure.ac
--- sbsigntools-0.9.3.orig/configure.ac 2020-01-09 18:33:38.000000000 +0100
+++ sbsigntools/configure.ac 2020-05-02 22:04:59.758305183 +0200
@@ -63,32 +63,6 @@
[],
AC_MSG_ERROR([libuuid (from the uuid package) is required]))
-dnl gnu-efi headers require extra include dirs
-EFI_ARCH=$(uname -m | sed 's/i.86/ia32/;s/arm.*/arm/')
-AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" ])
-
-##
-# no consistent view of where gnu-efi should dump the efi stuff, so find it
-##
-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
- if test -e $path/crt0-efi-$EFI_ARCH.o; then
- CRTPATH=$path
- fi
-done
-if test -z "$CRTPATH"; then
- AC_MSG_ERROR([cannot find the gnu-efi crt path])
-fi
-
-EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
- -DEFI_FUNCTION_WRAPPER"
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $EFI_CPPFLAGS"
-AC_CHECK_HEADERS([efi.h], [], [], $EFI_INCLUDES)
-CPPFLAGS="$CPPFLAGS_save"
-AC_SUBST(EFI_CPPFLAGS, $EFI_CPPFLAGS)
-AC_SUBST(EFI_ARCH, $EFI_ARCH)
-AC_SUBST(CRTPATH, $CRTPATH)
-
AC_CONFIG_FILES([Makefile src/Makefile lib/ccan/Makefile]
- [docs/Makefile tests/Makefile])
+ [docs/Makefile])
AC_OUTPUT
diff -ru sbsigntools-0.9.3.orig/docs/Makefile.am sbsigntools/docs/Makefile.am
--- sbsigntools-0.9.3.orig/docs/Makefile.am 2020-01-09 18:33:38.000000000 +0100
+++ sbsigntools/docs/Makefile.am 2020-05-02 22:12:41.441538721 +0200
@@ -1,6 +1,5 @@
-man1_MANS = sbsign.1 sbverify.1 sbattach.1 sbvarsign.1 sbsiglist.1 \
- sbkeysync.1
+man1_MANS = sbsign.1 sbverify.1 sbattach.1
EXTRA_DIST = sbsign.1.in sbverify.1.in sbattach.1.in \
sbvarsign.1.in sbsiglist.1.in
diff -ru sbsigntools-0.9.3.orig/Makefile.am sbsigntools/Makefile.am
--- sbsigntools-0.9.3.orig/Makefile.am 2020-01-09 18:33:38.000000000 +0100
+++ sbsigntools/Makefile.am 2020-05-02 22:16:07.359375795 +0200
@@ -1,2 +1,2 @@
-SUBDIRS = lib/ccan src docs tests
+SUBDIRS = lib/ccan src
diff -ru sbsigntools-0.9.3.orig/src/Makefile.am sbsigntools/src/Makefile.am
--- sbsigntools-0.9.3.orig/src/Makefile.am 2020-01-09 18:33:38.000000000 +0100
+++ sbsigntools/src/Makefile.am 2020-05-02 22:09:31.013544683 +0200
@@ -1,5 +1,5 @@
-bin_PROGRAMS = sbsign sbverify sbattach sbvarsign sbsiglist sbkeysync
+bin_PROGRAMS = sbsign sbverify sbattach
coff_headers = coff/external.h coff/pe.h
AM_CFLAGS = -Wall -Wextra --std=gnu99
diff -ru sbsigntools-0.9.3.orig/src/sbverify.c sbsigntools/src/sbverify.c
--- sbsigntools-0.9.3.orig/src/sbverify.c 2020-01-09 18:33:38.000000000 +0100
+++ sbsigntools/src/sbverify.c 2020-05-02 22:11:22.921541180 +0200
@@ -56,7 +56,7 @@
#include <openssl/pem.h>
#include <openssl/x509v3.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define X509_OBJECT_get0_X509(obj) ((obj)->data.x509)
#define X509_OBJECT_get_type(obj) ((obj)->type)
#define X509_STORE_CTX_get0_cert(ctx) ((ctx)->cert)
|