summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2020-08-08 21:14:37 -0500
committerJory Pratt <anarchy@gentoo.org>2020-08-08 21:14:37 -0500
commitfe2f940ef276a55c8ae3864b9a28f652b5b91688 (patch)
tree40ac9f7a1ea8521cf3998544ab90e8df38152962 /dev-libs/nss-pem
parentdev-lang/perl: Port my work-in-progress unkeyworded stuff to 5.32.0 (diff)
downloadgentoo-fe2f940ef276a55c8ae3864b9a28f652b5b91688.tar.gz
gentoo-fe2f940ef276a55c8ae3864b9a28f652b5b91688.tar.bz2
gentoo-fe2f940ef276a55c8ae3864b9a28f652b5b91688.zip
dev-libs/nss-pem: version bump, add support for >=dev-libs/nss-3.3
Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'dev-libs/nss-pem')
-rw-r--r--dev-libs/nss-pem/Manifest1
-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, 165 insertions, 0 deletions
diff --git a/dev-libs/nss-pem/Manifest b/dev-libs/nss-pem/Manifest
index 5a3fe7560eca..75cc92bbc9d9 100644
--- a/dev-libs/nss-pem/Manifest
+++ b/dev-libs/nss-pem/Manifest
@@ -1 +1,2 @@
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
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
+}