initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
From d159a5c59c80552c3e8ea75d9bcf29b3a8e8289d 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.
|
||||
[Retrieved (and updated to remove ChangeLog update) from:
|
||||
https://github.com/OpenSC/pkcs11-helper/pull/39]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
ChangeLog | 1 +
|
||||
lib/_pkcs11h-crypto-nss.c | 14 ++++++++++----
|
||||
lib/common.h | 7 +++++++
|
||||
3 files changed, 18 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
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
config BR2_PACKAGE_PKCS11_HELPER
|
||||
bool "pkcs11-helper"
|
||||
depends on !BR2_STATIC_LIBS # dlfcn.h
|
||||
help
|
||||
pkcs11-helper is a library that simplifies the interaction
|
||||
with PKCS#11 providers for end-user applications.
|
||||
|
||||
pkcs11-helper allows using multiple PKCS#11 providers at the
|
||||
same time, enumerating available token certificates, or
|
||||
selecting a certificate directly by serialized id, handling
|
||||
card removal and card insert events, handling card re-insert
|
||||
to a different slot, supporting session expiration and much
|
||||
more all using a simple API.
|
||||
|
||||
pkcs11-helper is not designed to manage card content, since
|
||||
object attributes are usually vendor specific, and 99% of
|
||||
application need to access existing objects in order to
|
||||
perform signature and decryption.
|
||||
|
||||
https://github.com/OpenSC/pkcs11-helper
|
||||
|
||||
comment "pkcs11-helper needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally computed
|
||||
sha256 653730f0c561bbf5941754c0783976113589b2dc64a0661c908dc878bfa4e58b pkcs11-helper-1.27.0.tar.bz2
|
||||
sha256 808705ac1daafe07a76431929575c5712a8693977a39ec9102aed25f030754d9 COPYING
|
||||
sha256 865496cf23a6c792739ff2f9ea11e95ac99db89cfe3780a295b4e1495a9c19fe COPYING.BSD
|
||||
sha256 cd2e7d63a11058f19c58b06fb8c759140ce70788369dce6e6e9db40d3475021e COPYING.GPL
|
||||
@@ -0,0 +1,58 @@
|
||||
################################################################################
|
||||
#
|
||||
# pkcs11-helper
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PKCS11_HELPER_VERSION = 1.27
|
||||
PKCS11_HELPER_SOURCE = pkcs11-helper-$(PKCS11_HELPER_VERSION).0.tar.bz2
|
||||
PKCS11_HELPER_SITE = https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-$(PKCS11_HELPER_VERSION)
|
||||
PKCS11_HELPER_LICENSE = GPL-2.0 or BSD-3-Clause
|
||||
PKCS11_HELPER_LICENSE_FILES = COPYING COPYING.BSD COPYING.GPL
|
||||
PKCS11_HELPER_DEPENDENCIES = host-pkgconf
|
||||
PKCS11_HELPER_AUTORECONF = YES
|
||||
PKCS11_HELPER_INSTALL_STAGING = YES
|
||||
|
||||
PKCS11_HELPER_CONF_OPTS = \
|
||||
--disable-crypto-engine-polarssl \
|
||||
--disable-crypto-engine-cryptoapi
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
PKCS11_HELPER_CONF_OPTS += --enable-slotevent --enable-threading
|
||||
else
|
||||
PKCS11_HELPER_CONF_OPTS += --disable-slotevent --disable-threading
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
||||
PKCS11_HELPER_DEPENDENCIES += gnutls
|
||||
PKCS11_HELPER_CONF_OPTS += --enable-crypto-engine-gnutls
|
||||
else
|
||||
PKCS11_HELPER_CONF_OPTS += --disable-crypto-engine-gnutls
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBNSS),y)
|
||||
PKCS11_HELPER_DEPENDENCIES += libnss
|
||||
PKCS11_HELPER_CONF_OPTS += --enable-crypto-engine-nss
|
||||
else
|
||||
PKCS11_HELPER_CONF_OPTS += --disable-crypto-engine-nss
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MBEDTLS),y)
|
||||
PKCS11_HELPER_DEPENDENCIES += mbedtls
|
||||
PKCS11_HELPER_CONF_OPTS += --enable-crypto-engine-mbedtls
|
||||
else
|
||||
PKCS11_HELPER_CONF_OPTS += --disable-crypto-engine-mbedtls
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
PKCS11_HELPER_DEPENDENCIES += openssl
|
||||
PKCS11_HELPER_CONF_OPTS += \
|
||||
--enable-openssl \
|
||||
--enable-crypto-engine-openssl
|
||||
else
|
||||
PKCS11_HELPER_CONF_OPTS += \
|
||||
--disable-openssl \
|
||||
--disable-crypto-engine-openssl
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user