summaryrefslogtreecommitdiff
path: root/dev-libs/nss-pem
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-libs/nss-pem
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-libs/nss-pem')
-rw-r--r--dev-libs/nss-pem/Manifest3
-rw-r--r--dev-libs/nss-pem/files/nss-pem-1.0.5-nss-3.53.1-support.patch128
-rw-r--r--dev-libs/nss-pem/nss-pem-1.0.6.ebuild36
3 files changed, 167 insertions, 0 deletions
diff --git a/dev-libs/nss-pem/Manifest b/dev-libs/nss-pem/Manifest
index 8abb3383a897..2f050e1281f5 100644
--- a/dev-libs/nss-pem/Manifest
+++ b/dev-libs/nss-pem/Manifest
@@ -1,3 +1,6 @@
+AUX nss-pem-1.0.5-nss-3.53.1-support.patch 5005 BLAKE2B 4cacfbc965c5c5add442e8a37a1c4ad5c567763aeec7ab567c7558fd4b343cfeeec952a5d4c5131f279d3a7794b753ba424c27398263d4b03751a7308eda118c SHA512 8a19a7831d92e45f101ca44e278b319bfd3884d4eb17ec268ca08ed08542ecf51f81be23079e30d5b87aaa467f4104c88d739043aa3c36989540a69a23f4ae13
DIST nss-pem-1.0.5.tar.xz 36320 BLAKE2B c2294595d95a2de2bf6d9e68dc10955297fb6ef27c9e85dbabc7854b900942070f70a8e4c1abef618e7265daa75f5bd2a2fca3fe923973345f9c1b64a3da8ff5 SHA512 8dabebf114ac94441caf6d279f810de4124a3ffc05ae66777496b3e66f8b8148d535cb438a165d84f53111c468d595f3b16651cd7a990eeedca9d413aad65b2b
+DIST nss-pem-1.0.6.tar.xz 36304 BLAKE2B ea804bb7b45c6d23c82ac823e36244b13d9b8ef8355cf30e82cc09850e623317ddffdbf4f8fd0ffa9253cd64d47dd12aa1738a8f720b3ac0e9091dff3421fa02 SHA512 2640c30aa8b0721e479f77781da7b4984553a01bff481084ad6e028cb6c99e2441f89b7758b5fc10f7c586e41dfcab2083a7c47bd1e0ce19712d0c61ac237540
EBUILD nss-pem-1.0.5.ebuild 644 BLAKE2B 6c953bf5e89b2f2fe668af5204a463f9aba5103e20bab64378d3b41eb1fbc66e53ec16b284ea3593ea05674f897d7659b8b8c25f8a3d3320c2209274eb495aa0 SHA512 7e6c8698937df6330d566736391717e4030fa026216a7d5f3f015e27708ac60402f551987c729ce536c0203202b4377673062f7ad4f7e5d6f3e05b213fc5f452
+EBUILD nss-pem-1.0.6.ebuild 711 BLAKE2B 74a349ad6bf0deef84d57e099c7473518c187743657e700625dc7aa18412c62efbb63c907185087a01f6edbcbf9eb575d05a30a93d3ea3453205a442c29aa451 SHA512 0105fc1eab10de04e0b256e13c199740a8c13d6f921062112e0e6124cdd7b6640ffdb3fae16ef7170bef49e41074cb209d69af84530a83c38090c18dbedb58ee
MISC metadata.xml 332 BLAKE2B d0c820a1adbfacc8057f9110c542b17a456425ff7db013dbcef98a325a2f2c04950b15589cad36eb9bc9fb113a9fad35dd913821b41865282160878136783749 SHA512 20a26118c4e465049f6ee61e855ccd9b19a2c52caca91c0c73dd8e30a381c653f97603e7f2a6d8d64bd7aa6eff32f40044096a3257c5587ddbe6570d258e94bb
diff --git a/dev-libs/nss-pem/files/nss-pem-1.0.5-nss-3.53.1-support.patch b/dev-libs/nss-pem/files/nss-pem-1.0.5-nss-3.53.1-support.patch
new file mode 100644
index 000000000000..10cfd2cd0228
--- /dev/null
+++ b/dev-libs/nss-pem/files/nss-pem-1.0.5-nss-3.53.1-support.patch
@@ -0,0 +1,128 @@
+From e14d5b53ad588e45b2bcffb778563daf2fead5df Mon Sep 17 00:00:00 2001
+From: Ian Kumlien <ian.kumlien@gmail.com>
+Date: Fri, 7 Aug 2020 15:57:17 +0200
+Subject: [PATCH] replace deprecated CK?_NETSCAPE_? constants
+
+... with the corresponding CK?_NSS_? constants
+
+Fixes: https://github.com/kdudka/nss-pem/issues/6
+Closes: https://github.com/kdudka/nss-pem/pull/7
+---
+ pfind.c | 16 ++++++++--------
+ pinst.c | 8 ++++----
+ pobject.c | 10 +++++-----
+ 3 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/pfind.c b/pfind.c
+index 83d5b89..fa5dd4d 100644
+--- a/pfind.c
++++ b/pfind.c
+@@ -276,18 +276,18 @@ collect_objects(CK_ATTRIBUTE_PTR pTemplate,
+ type = pemBareKey;
+ plog("CKO_PRIVATE_KEY\n");
+ break;
+- case CKO_NETSCAPE_TRUST:
++ case CKO_NSS_TRUST:
+ type = pemTrust;
+- plog("CKO_NETSCAPE_TRUST\n");
++ plog("CKO_NSS_TRUST\n");
+ break;
+- case CKO_NETSCAPE_CRL:
+- plog("CKO_NETSCAPE_CRL\n");
++ case CKO_NSS_CRL:
++ plog("CKO_NSS_CRL\n");
+ goto done;
+- case CKO_NETSCAPE_SMIME:
+- plog("CKO_NETSCAPE_SMIME\n");
++ case CKO_NSS_SMIME:
++ plog("CKO_NSS_SMIME\n");
+ goto done;
+- case CKO_NETSCAPE_BUILTIN_ROOT_LIST:
+- plog("CKO_NETSCAPE_BUILTIN_ROOT_LIST\n");
++ case CKO_NSS_BUILTIN_ROOT_LIST:
++ plog("CKO_NSS_BUILTIN_ROOT_LIST\n");
+ goto done;
+ case CK_INVALID_HANDLE:
+ type = pemAll; /* look through all objectclasses - ignore the type field */
+diff --git a/pinst.c b/pinst.c
+index ef2d955..564458e 100644
+--- a/pinst.c
++++ b/pinst.c
+@@ -236,7 +236,7 @@ CreateObject(CK_OBJECT_CLASS objClass,
+ /* more unique nicknames - https://bugzilla.redhat.com/689031#c66 */
+ nickname = filename;
+ break;
+- case CKO_NETSCAPE_TRUST:
++ case CKO_NSS_TRUST:
+ plog("Creating trust nick %s id %ld in slot %ld\n", nickname, objid, slotID);
+ memset(&o->u.trust, 0, sizeof(o->u.trust));
+ break;
+@@ -265,7 +265,7 @@ CreateObject(CK_OBJECT_CLASS objClass,
+
+ switch (objClass) {
+ case CKO_CERTIFICATE:
+- case CKO_NETSCAPE_TRUST:
++ case CKO_NSS_TRUST:
+ if (SECSuccess != GetCertFields(o->derCert->data, o->derCert->len,
+ &issuer, &serial, &derSN, &subject,
+ &valid, &subjkey))
+@@ -344,7 +344,7 @@ derEncodingsMatch(CK_OBJECT_CLASS objClass, pemInternalObject * obj,
+
+ switch (objClass) {
+ case CKO_CERTIFICATE:
+- case CKO_NETSCAPE_TRUST:
++ case CKO_NSS_TRUST:
+ result = SECITEM_CompareItem(obj->derCert, certDER);
+ break;
+
+@@ -497,7 +497,7 @@ AddCertificate(char *certfile, char *keyfile, PRBool cacert,
+ nickname, 0, slotID, NULL);
+ if (o != NULL) {
+ /* Add the CA trust object */
+- o = AddObjectIfNeeded(CKO_NETSCAPE_TRUST, pemTrust, objs[i], NULL,
++ o = AddObjectIfNeeded(CKO_NSS_TRUST, pemTrust, objs[i], NULL,
+ nickname, 0, slotID, NULL);
+ }
+ if (o == NULL) {
+diff --git a/pobject.c b/pobject.c
+index f613678..a97f3e2 100644
+--- a/pobject.c
++++ b/pobject.c
+@@ -149,8 +149,8 @@ static const CK_KEY_TYPE ckk_rsa = CKK_RSA;
+ static const CK_OBJECT_CLASS cko_certificate = CKO_CERTIFICATE;
+ static const CK_OBJECT_CLASS cko_private_key = CKO_PRIVATE_KEY;
+ static const CK_OBJECT_CLASS cko_public_key = CKO_PUBLIC_KEY;
+-static const CK_OBJECT_CLASS cko_trust = CKO_NETSCAPE_TRUST;
+-static const CK_TRUST ckt_netscape_trusted = CKT_NETSCAPE_TRUSTED_DELEGATOR;
++static const CK_OBJECT_CLASS cko_trust = CKO_NSS_TRUST;
++static const CK_TRUST ckt_netscape_trusted = CKT_NSS_TRUSTED_DELEGATOR;
+ static const NSSItem pem_trueItem = {
+ (void *) &ck_true, (PRUint32) sizeof(CK_BBOOL)
+ };
+@@ -578,7 +578,7 @@ pem_FetchAttribute
+ return pem_FetchCertAttribute(io, type);
+ case CKO_PRIVATE_KEY:
+ return pem_FetchPrivKeyAttribute(io, type, pError);
+- case CKO_NETSCAPE_TRUST:
++ case CKO_NSS_TRUST:
+ return pem_FetchTrustAttribute(io, type);
+ case CKO_PUBLIC_KEY:
+ return pem_FetchPubKeyAttribute(io, type);
+@@ -775,7 +775,7 @@ pem_mdObject_GetAttributeCount
+ return pubKeyAttrsCount;
+ case CKO_PRIVATE_KEY:
+ return privKeyAttrsCount;
+- case CKO_NETSCAPE_TRUST:
++ case CKO_NSS_TRUST:
+ return trustAttrsCount;
+ default:
+ break;
+@@ -1168,7 +1168,7 @@ pem_CreateObject
+ if (listItem->io != NULL) {
+ /* Add the trust object */
+ APPEND_LIST_ITEM(listItem);
+- listItem->io = AddObjectIfNeeded(CKO_NETSCAPE_TRUST, pemTrust,
++ listItem->io = AddObjectIfNeeded(CKO_NSS_TRUST, pemTrust,
+ derlist[c], NULL, nickname, 0,
+ slotID, NULL);
+ }
diff --git a/dev-libs/nss-pem/nss-pem-1.0.6.ebuild b/dev-libs/nss-pem/nss-pem-1.0.6.ebuild
new file mode 100644
index 000000000000..fc81aed71ccc
--- /dev/null
+++ b/dev-libs/nss-pem/nss-pem-1.0.6.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS="cmake"
+
+inherit cmake-multilib
+
+DESCRIPTION="PEM file reader for Network Security Services (NSS)"
+HOMEPAGE="https://github.com/kdudka/nss-pem"
+SRC_URI="https://github.com/kdudka/${PN}/releases/download/${P}/${P}.tar.xz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE=""
+
+BDEPEND=" >=dev-libs/nss-3.50-r1 "
+RDEPEND="${BDEPEND}"
+
+DEPEND="!<=dev-libs/nss-3.50
+ ${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/nss-pem-1.0.5-nss-3.53.1-support.patch"
+)
+
+S="${WORKDIR}/${P}/src"
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ )
+ cmake_src_configure
+}