This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgpkg: pkcs11-helper 1.27.0-2: fix build with recent nss (FS#72291)
git-svn-id: file:///srv/repos/svn-packages/svn@425747 eb2447ed-0c53-47e4-bac8-5bc4a241df78
- Loading branch information
eworm
authored and
svntogit
committed
Oct 10, 2021
1 parent
d50c5c5
commit 238f5e9
Showing
2 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From 083a3a62f2e631deec2fb2799d10660a41c50294 Mon Sep 17 00:00:00 2001 | ||
From: Alon Bar-Lev <alon.barlev@gmail.com> | ||
Date: Fri, 30 Jul 2021 20:06:36 +0300 | ||
Subject: [PATCH] nss: use nss pkcs11.h | ||
|
||
make nss happy with its own extensions and non-standard behavior. | ||
--- | ||
lib/_pkcs11h-crypto-nss.c | 14 ++++++++++---- | ||
lib/common.h | 7 +++++++ | ||
2 files changed, 17 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/lib/_pkcs11h-crypto-nss.c b/lib/_pkcs11h-crypto-nss.c | ||
index 4b70e826..f57f9e6b 100644 | ||
--- a/lib/_pkcs11h-crypto-nss.c | ||
+++ b/lib/_pkcs11h-crypto-nss.c | ||
@@ -48,15 +48,21 @@ | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
-#include "common.h" | ||
- | ||
-#include "_pkcs11h-crypto.h" | ||
+#ifdef HAVE_CONFIG_H | ||
+#include <config.h> | ||
+#endif | ||
|
||
#if defined(ENABLE_PKCS11H_ENGINE_NSS) | ||
-#define _PKCS11T_H_ /* required so no conflict with ours */ | ||
#include <nss.h> | ||
#include <cert.h> | ||
|
||
+/* Use PKCS#11 of nss to avoid conflicts and make nss happy with its own extensions */ | ||
+#define PKCS11_H 1 | ||
+ | ||
+#include "common.h" | ||
+ | ||
+#include "_pkcs11h-crypto.h" | ||
+ | ||
static | ||
int | ||
__pkcs11h_crypto_nss_initialize ( | ||
diff --git a/lib/common.h b/lib/common.h | ||
index 61a958af..2499e9c5 100644 | ||
--- a/lib/common.h | ||
+++ b/lib/common.h | ||
@@ -72,5 +72,12 @@ | ||
|
||
#define _PKCS11H_ASSERT assert | ||
|
||
+#ifndef FALSE | ||
+#define FALSE 0 | ||
+#endif | ||
+#ifndef TRUE | ||
+#define TRUE 1 | ||
+#endif | ||
+ | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters