summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch61
-rw-r--r--meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb1
2 files changed, 62 insertions, 0 deletions
diff --git a/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch
new file mode 100644
index 0000000000..3070fc41a0
--- /dev/null
+++ b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper/0001-nss-use-nss-pkcs11-h.patch
@@ -0,0 +1,61 @@
1From 083a3a62f2e631deec2fb2799d10660a41c50294 Mon Sep 17 00:00:00 2001
2From: Alon Bar-Lev <alon.barlev@gmail.com>
3Date: Fri, 30 Jul 2021 20:06:36 +0300
4Subject: [PATCH] nss: use nss pkcs11.h
5
6make nss happy with its own extensions and non-standard behavior.
7
8Taken from Archlinux [1]
9
10[1] https://github.com/archlinux/svntogit-packages/commit/238f5e90946f527b2d4a507e02c30e977db38a97
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 lib/_pkcs11h-crypto-nss.c | 14 ++++++++++----
16 lib/common.h | 7 +++++++
17 2 files changed, 17 insertions(+), 4 deletions(-)
18
19--- a/lib/_pkcs11h-crypto-nss.c
20+++ b/lib/_pkcs11h-crypto-nss.c
21@@ -48,15 +48,21 @@
22 * POSSIBILITY OF SUCH DAMAGE.
23 */
24
25-#include "common.h"
26-
27-#include "_pkcs11h-crypto.h"
28+#ifdef HAVE_CONFIG_H
29+#include <config.h>
30+#endif
31
32 #if defined(ENABLE_PKCS11H_ENGINE_NSS)
33-#define _PKCS11T_H_ /* required so no conflict with ours */
34 #include <nss.h>
35 #include <cert.h>
36
37+/* Use PKCS#11 of nss to avoid conflicts and make nss happy with its own extensions */
38+#define PKCS11_H 1
39+
40+#include "common.h"
41+
42+#include "_pkcs11h-crypto.h"
43+
44 static
45 int
46 __pkcs11h_crypto_nss_initialize (
47--- a/lib/common.h
48+++ b/lib/common.h
49@@ -72,5 +72,12 @@
50
51 #define _PKCS11H_ASSERT assert
52
53+#ifndef FALSE
54+#define FALSE 0
55+#endif
56+#ifndef TRUE
57+#define TRUE 1
58+#endif
59+
60 #endif
61
diff --git a/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb
index 1af9004fea..389d1bc7bb 100644
--- a/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb
+++ b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb
@@ -17,6 +17,7 @@ LIC_FILES_CHKSUM = " \
17" 17"
18SRC_URI = "git://github.com/OpenSC/${BPN}.git;branch=master;protocol=https \ 18SRC_URI = "git://github.com/OpenSC/${BPN}.git;branch=master;protocol=https \
19 file://0001-build-openssl-remove-RSA_SSLV23_PADDING-constant-usa.patch \ 19 file://0001-build-openssl-remove-RSA_SSLV23_PADDING-constant-usa.patch \
20 file://0001-nss-use-nss-pkcs11-h.patch \
20 " 21 "
21 22
22S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"