From e755824ad7a0bd4c5bb54fbf4a3763df843526dc Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Tue, 20 Sep 2022 22:30:03 -0700 Subject: [PATCH 01/19] Rebase to nss 3.83 and nspr 4.35 --- .gitignore | 2 ++ nspr-gcc-atomics.patch | 42 ++++++++---------------------------------- nss.spec | 10 +++++++--- sources | 4 ++-- 4 files changed, 19 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index e492b18..2e32c54 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,5 @@ TestUser51.cert /nss-3.79.tar.gz /nspr-4.34.tar.gz /nss-3.81.tar.gz +/nss-3.83.tar.gz +/nspr-4.35.tar.gz diff --git a/nspr-gcc-atomics.patch b/nspr-gcc-atomics.patch index b94e840..20eaefa 100644 --- a/nspr-gcc-atomics.patch +++ b/nspr-gcc-atomics.patch @@ -1,12 +1,7 @@ -diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h ---- a/pr/include/md/_linux.h -+++ b/pr/include/md/_linux.h -@@ -82,53 +82,73 @@ - #define NO_DLOPEN_NULL - #endif - - #if defined(__FreeBSD_kernel__) || defined(__GNU__) - #define _PR_HAVE_SOCKADDR_LEN +diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h +--- ./pr/include/md/_linux.h.gcc-atomics 2022-09-20 11:23:22.008942926 -0700 ++++ ./pr/include/md/_linux.h 2022-09-20 11:34:45.536751340 -0700 +@@ -105,6 +105,15 @@ #endif #if defined(__i386__) @@ -22,11 +17,7 @@ diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h #define _PR_HAVE_ATOMIC_OPS #define _MD_INIT_ATOMIC() extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val); - #define _MD_ATOMIC_INCREMENT _PR_x86_AtomicIncrement - extern PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val); - #define _MD_ATOMIC_DECREMENT _PR_x86_AtomicDecrement - extern PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val); - #define _MD_ATOMIC_ADD _PR_x86_AtomicAdd +@@ -116,6 +125,7 @@ extern PRInt32 _PR_x86_AtomicAdd(PRInt32 extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval); #define _MD_ATOMIC_SET _PR_x86_AtomicSet #endif @@ -34,15 +25,7 @@ diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h #if defined(__ia64__) #define _PR_HAVE_ATOMIC_OPS - #define _MD_INIT_ATOMIC() - extern PRInt32 _PR_ia64_AtomicIncrement(PRInt32 *val); - #define _MD_ATOMIC_INCREMENT _PR_ia64_AtomicIncrement - extern PRInt32 _PR_ia64_AtomicDecrement(PRInt32 *val); - #define _MD_ATOMIC_DECREMENT _PR_ia64_AtomicDecrement - extern PRInt32 _PR_ia64_AtomicAdd(PRInt32 *ptr, PRInt32 val); - #define _MD_ATOMIC_ADD _PR_ia64_AtomicAdd - extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval); - #define _MD_ATOMIC_SET _PR_ia64_AtomicSet +@@ -131,6 +141,15 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt3 #endif #if defined(__x86_64__) @@ -58,20 +41,11 @@ diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h #define _PR_HAVE_ATOMIC_OPS #define _MD_INIT_ATOMIC() extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val); - #define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement - extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val); - #define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement - extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val); - #define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd +@@ -142,6 +161,7 @@ extern PRInt32 _PR_x86_64_AtomicAdd(PRIn extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval); #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet #endif +#endif - #if defined(__or1k__) + #if defined(__loongarch__) #if defined(__GNUC__) - /* Use GCC built-in functions */ - #define _PR_HAVE_ATOMIC_OPS - #define _MD_INIT_ATOMIC() - #define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1) - #define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1) diff --git a/nss.spec b/nss.spec index 3767364..295fba1 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ -%global nspr_version 4.34.0 -%global nss_version 3.81.0 +%global nspr_version 4.35.0 +%global nss_version 3.83.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+2] +%global nspr_release %baserelease # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1090,6 +1090,10 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Sep 20 2022 Bob Relyea - 3.83.0-1 + - update to NSS 3.83 + - update to NSPR 4.35 + * Thu Jun 21 2022 Bob Relyea - 3.81.0-1 - udpate to NSS 3.81 diff --git a/sources b/sources index 8b30724..b36e034 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nspr-4.34.tar.gz) = 4cfac886c14cf7df4c4b79fa1c3bc92e1b14260c9c3018fa2562060d62fecb4e66c0b4e8f7edf4f4823def784a919d99dde88a89674f0cd8a644310b0569ead4 -SHA512 (nss-3.81.tar.gz) = 206faa29ff9fc9c70f85cbb86690b55bd11003a1a5b1d49f5f3731fdd1221690f957a17d912ee5272505afb938968327f4532ae8f5d2d77e6e13370768229747 +SHA512 (nss-3.83.tar.gz) = 550cf1116e39e58041feaa67913f570d791e8153cc0522ba7ae02e27a61e0a4e6a25224be0f25d51a842dc11c70d600263450ebff0a9fdaa2840bafa3fc9ddd5 +SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f From f755c6a8325ef25a7fa0f293e1c1366dba553582 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Thu, 17 Nov 2022 16:19:49 -0800 Subject: [PATCH 02/19] Update NSS to 3.85 (rhbz#214318) --- .gitignore | 1 + nss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2e32c54..43c0bc2 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ TestUser51.cert /nss-3.81.tar.gz /nss-3.83.tar.gz /nspr-4.35.tar.gz +/nss-3.85.tar.gz diff --git a/nss.spec b/nss.spec index 295fba1..497c0b0 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.83.0 +%global nss_version 3.85.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %baserelease +%global nspr_release %[%baserelease+1] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1090,6 +1090,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Nov 17 2022 Bob Relyea - 3.85.0-1 + - update to NSS 3.85 + * Tue Sep 20 2022 Bob Relyea - 3.83.0-1 - update to NSS 3.83 - update to NSPR 4.35 diff --git a/sources b/sources index b36e034..c9d91e9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nss-3.83.tar.gz) = 550cf1116e39e58041feaa67913f570d791e8153cc0522ba7ae02e27a61e0a4e6a25224be0f25d51a842dc11c70d600263450ebff0a9fdaa2840bafa3fc9ddd5 +SHA512 (nss-3.85.tar.gz) = 97cfffa2beed1dba5d31e0c6e450553e5a8c78b427521640adb00c05d9d63cd64dc08388f0dbf96c93efb79f5daf4ba8db8d026b0b43d2e5c865a9b833fc77a1 SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f From 50695c8df523bcef787f1e3477bc6f79d7c6b336 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Wed, 4 Jan 2023 20:22:08 +0100 Subject: [PATCH 03/19] Update NSS to 3.87 & remove unused patches Signed-off-by: Frantisek Krenzelok --- .gitignore | 1 + ....1-revert_rhel8_unsafe_policy_change.patch | 39 - nss-3.65-disable-hw-ppc.patch | 19 - nss-3.79-fix-client-cert-crash.patch | 23 - nss-539183.patch | 62 -- nss-fedora-btrf-sql-hack.patch | 18 - nss-fix-PayPal-upstream.patch | 42 - nss-sql-man-page.patch | 749 ------------------ nss.spec | 10 +- sources | 2 +- 10 files changed, 7 insertions(+), 958 deletions(-) delete mode 100644 nss-3.53.1-revert_rhel8_unsafe_policy_change.patch delete mode 100644 nss-3.65-disable-hw-ppc.patch delete mode 100644 nss-3.79-fix-client-cert-crash.patch delete mode 100644 nss-539183.patch delete mode 100644 nss-fedora-btrf-sql-hack.patch delete mode 100644 nss-fix-PayPal-upstream.patch delete mode 100644 nss-sql-man-page.patch diff --git a/.gitignore b/.gitignore index 43c0bc2..73aa652 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,4 @@ TestUser51.cert /nss-3.83.tar.gz /nspr-4.35.tar.gz /nss-3.85.tar.gz +/nss-3.87.tar.gz diff --git a/nss-3.53.1-revert_rhel8_unsafe_policy_change.patch b/nss-3.53.1-revert_rhel8_unsafe_policy_change.patch deleted file mode 100644 index 9e39df7..0000000 --- a/nss-3.53.1-revert_rhel8_unsafe_policy_change.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up ./lib/pk11wrap/pk11pars.c.policy_revert ./lib/pk11wrap/pk11pars.c ---- ./lib/pk11wrap/pk11pars.c.policy_revert 2020-11-04 10:26:59.085300799 -0800 -+++ ./lib/pk11wrap/pk11pars.c 2020-11-04 10:29:52.774239468 -0800 -@@ -391,12 +391,6 @@ static const oidValDef signOptList[] = { - /* Signatures */ - { CIPHER_NAME("DSA"), SEC_OID_ANSIX9_DSA_SIGNATURE, - NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, -- { CIPHER_NAME("RSA-PKCS"), SEC_OID_PKCS1_RSA_ENCRYPTION, -- NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, -- { CIPHER_NAME("RSA-PSS"), SEC_OID_PKCS1_RSA_PSS_SIGNATURE, -- NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, -- { CIPHER_NAME("ECDSA"), SEC_OID_ANSIX962_EC_PUBLIC_KEY, -- NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, - }; - - typedef struct { -@@ -412,7 +406,7 @@ static const algListsDef algOptLists[] = - { macOptList, PR_ARRAY_SIZE(macOptList), "MAC", PR_FALSE }, - { cipherOptList, PR_ARRAY_SIZE(cipherOptList), "CIPHER", PR_FALSE }, - { kxOptList, PR_ARRAY_SIZE(kxOptList), "OTHER-KX", PR_FALSE }, -- { signOptList, PR_ARRAY_SIZE(signOptList), "OTHER-SIGN", PR_FALSE }, -+ { signOptList, PR_ARRAY_SIZE(signOptList), "OTHER-SIGN", PR_TRUE }, - }; - - static const optionFreeDef sslOptList[] = { -diff -up ./tests/ssl/sslpolicy.txt.policy_revert ./tests/ssl/sslpolicy.txt ---- ./tests/ssl/sslpolicy.txt.policy_revert 2020-11-04 10:31:20.837715397 -0800 -+++ ./tests/ssl/sslpolicy.txt 2020-11-04 10:33:19.598357223 -0800 -@@ -193,7 +193,9 @@ - 1 noECC SSL3 d disallow=all_allow=hmac-sha1:sha256:rsa-pkcs:rsa:des-ede3-cbc:tls-version-min=tls1.0:tls-version-max=tls1.2 Disallow Version Implicitly Narrow - 1 noECC SSL3 d disallow=all_allow=md2/all:md4/all:md5/all:sha1/all:sha256/all:sha384/all:sha512/all:rsa-pkcs/all:rsa-pss/all:ecdsa/all:dsa/all:hmac-sha1/all:hmac-sha224/all:hmac-sha256/all:hmac-sha384/all:hmac-sha512/all:hmac-md5/all:camellia128-cbc/all:camellia192-cbc/all:camellia256-cbc/all:seed-cbc/all:des-ede3-cbc/all:des-40-cbc/all:des-cbc/all:null-cipher/all:rc2/all:rc4/all:idea/all:rsa/all:rsa-export/all:dhe-rsa/all:dhe-dss/all:ecdhe-ecdsa/all:ecdhe-rsa/all:ecdh-ecdsa/all:ecdh-rsa/all:tls-version-min=tls1.0:tls-version-max=tls1.2 Disallow Version Implicitly - 0 noECC SSL3 d disallow=dsa Disallow DSA Signatures Explicitly -- 1 noECC SSL3 d disallow=rsa-pkcs Disallow RSA PKCS 1 Signatures Explicitly -+# rsa-pkcs, rsa-pss, and ecdsa policy checking reverted in rhel8 for binary -+# compatibility reasons -+# 1 noECC SSL3 d disallow=rsa-pkcs Disallow RSA PKCS 1 Signatures Explicitly - # test default settings - # NOTE: tstclient will attempt to overide the defaults, so we detect we - # were successful by locking in our settings diff --git a/nss-3.65-disable-hw-ppc.patch b/nss-3.65-disable-hw-ppc.patch deleted file mode 100644 index e435bcf..0000000 --- a/nss-3.65-disable-hw-ppc.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up ./lib/freebl/blinit.c.disable_hw_ppc ./lib/freebl/blinit.c ---- ./lib/freebl/blinit.c.disable_hw_ppc 2021-05-27 18:04:59.754657701 -0700 -+++ ./lib/freebl/blinit.c 2021-05-27 18:07:02.756397733 -0700 -@@ -502,6 +502,7 @@ CheckPPCSupport() - char *disable_hw_crypto = PR_GetEnvSecure("NSS_DISABLE_PPC_GHASH"); - - unsigned long hwcaps = 0; -+#ifdef notdef - #if defined(__linux__) - #if __has_include() - hwcaps = getauxval(AT_HWCAP2); -@@ -516,6 +517,7 @@ CheckPPCSupport() - sysctlbyname("hw.cpu_features2", &hwcaps, &len, NULL, 0); - #endif - #endif -+#endif - - ppc_crypto_support_ = hwcaps & PPC_FEATURE2_VEC_CRYPTO && disable_hw_crypto == NULL; - } diff --git a/nss-3.79-fix-client-cert-crash.patch b/nss-3.79-fix-client-cert-crash.patch deleted file mode 100644 index 5f80fdc..0000000 --- a/nss-3.79-fix-client-cert-crash.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/lib/ssl/authcert.c b/lib/ssl/authcert.c ---- a/lib/ssl/authcert.c -+++ b/lib/ssl/authcert.c -@@ -212,17 +212,17 @@ NSS_GetClientAuthData(void *arg, - pw_arg); - } else { - int nnames = 0; - char **names = ssl_DistNamesToStrings(caNames, &nnames); - rv = CERT_FilterCertListByCANames(certList, nnames, names, - certUsageSSLClient); - ssl_FreeDistNamesStrings(names, nnames); - } -- if ((rv != SECSuccess) || CERT_LIST_EMPTY(certList)) { -+ if ((rv != SECSuccess) || (certList && CERT_LIST_EMPTY(certList))) { - CERT_DestroyCertList(certList); - certList = NULL; - } - } - if (certList == NULL) { - /* no user certs meeting the nickname/usage requirements found */ - return SECFailure; - } - diff --git a/nss-539183.patch b/nss-539183.patch deleted file mode 100644 index 267e71e..0000000 --- a/nss-539183.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- nss/cmd/httpserv/httpserv.c.539183 2016-05-21 18:31:39.879585420 -0700 -+++ nss/cmd/httpserv/httpserv.c 2016-05-21 18:37:22.374464057 -0700 -@@ -953,23 +953,23 @@ - getBoundListenSocket(unsigned short port) - { - PRFileDesc *listen_sock; - int listenQueueDepth = 5 + (2 * maxThreads); - PRStatus prStatus; - PRNetAddr addr; - PRSocketOptionData opt; - -- addr.inet.family = PR_AF_INET; -- addr.inet.ip = PR_INADDR_ANY; -- addr.inet.port = PR_htons(port); -+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) { -+ errExit("PR_SetNetAddr"); -+ } - -- listen_sock = PR_NewTCPSocket(); -+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6); - if (listen_sock == NULL) { -- errExit("PR_NewTCPSocket"); -+ errExit("PR_OpenTCPSockett"); - } - - opt.option = PR_SockOpt_Nonblocking; - opt.value.non_blocking = PR_FALSE; - prStatus = PR_SetSocketOption(listen_sock, &opt); - if (prStatus < 0) { - PR_Close(listen_sock); - errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)"); ---- nss/cmd/selfserv/selfserv.c.539183 2016-05-21 18:31:39.882585367 -0700 -+++ nss/cmd/selfserv/selfserv.c 2016-05-21 18:41:43.092801174 -0700 -@@ -1711,23 +1711,23 @@ - getBoundListenSocket(unsigned short port) - { - PRFileDesc *listen_sock; - int listenQueueDepth = 5 + (2 * maxThreads); - PRStatus prStatus; - PRNetAddr addr; - PRSocketOptionData opt; - -- addr.inet.family = PR_AF_INET; -- addr.inet.ip = PR_INADDR_ANY; -- addr.inet.port = PR_htons(port); -+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) { -+ errExit("PR_SetNetAddr"); -+ } - -- listen_sock = PR_NewTCPSocket(); -+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6); - if (listen_sock == NULL) { -- errExit("PR_NewTCPSocket"); -+ errExit("PR_OpenTCPSocket error"); - } - - opt.option = PR_SockOpt_Nonblocking; - opt.value.non_blocking = PR_FALSE; - prStatus = PR_SetSocketOption(listen_sock, &opt); - if (prStatus < 0) { - PR_Close(listen_sock); - errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)"); diff --git a/nss-fedora-btrf-sql-hack.patch b/nss-fedora-btrf-sql-hack.patch deleted file mode 100644 index db60cc2..0000000 --- a/nss-fedora-btrf-sql-hack.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up ./lib/softoken/sdb.c.orig ./lib/softoken/sdb.c ---- ./lib/softoken/sdb.c.orig 2020-12-11 22:49:26.961726193 -0500 -+++ ./lib/softoken/sdb.c 2020-12-11 23:01:30.739122494 -0500 -@@ -690,8 +690,14 @@ sdb_openDB(const char *name, sqlite3 **s - openFlags = SQLITE_OPEN_READONLY; - } else { - openFlags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE; -+ /* btrfs and sqlite seem to incorrectly open readwrite. -+ * when the file is readonly explicitly reject that issue here */ -+ if ((_NSSUTIL_Access(name, PR_ACCESS_EXISTS) == PR_SUCCESS) && (_NSSUTIL_Access(name, PR_ACCESS_WRITE_OK) != PR_SUCCESS)) { -+ return SQLITE_READONLY; -+ } - } - -+ - /* Requires SQLite 3.5.0 or newer. */ - sqlerr = sqlite3_open_v2(name, sqlDB, openFlags, NULL); - if (sqlerr != SQLITE_OK) { diff --git a/nss-fix-PayPal-upstream.patch b/nss-fix-PayPal-upstream.patch deleted file mode 100644 index 71e78cb..0000000 --- a/nss-fix-PayPal-upstream.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/tests/chains/chains.sh b/tests/chains/chains.sh ---- a/tests/chains/chains.sh -+++ b/tests/chains/chains.sh -@@ -917,7 +917,7 @@ - done - - VFY_OPTS_TNAME="${DB_OPT} ${ENGINE} ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${TRUST_OPT}" -- VFY_OPTS_ALL="${DB_OPT} ${ENGINE} -vv ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${VFY_CERTS} ${TRUST_OPT}" -+ VFY_OPTS_ALL="${DB_OPT} ${ENGINE} -vv ${VFY_TIME_OPT} ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${VFY_CERTS} ${TRUST_OPT}" - - TESTNAME="Verifying certificate(s) ${VFY_LIST} with flags ${VFY_OPTS_TNAME}" - echo "${SCRIPTNAME}: ${TESTNAME}" -@@ -1118,6 +1118,7 @@ - ;; - "verify") - VERIFY="${VALUE}" -+ VFY_TIME_OPT= - TRUST= - TRUST_AND_DB= - POLICY= -@@ -1126,6 +1127,9 @@ - REV_OPTS= - USAGE_OPT= - ;; -+ "at_time") -+ VFY_TIME_OPT="-b ${VALUE}" -+ ;; - "cert") - VERIFY="${VERIFY} ${VALUE}" - ;; -diff --git a/tests/chains/scenarios/realcerts.cfg b/tests/chains/scenarios/realcerts.cfg ---- a/tests/chains/scenarios/realcerts.cfg -+++ b/tests/chains/scenarios/realcerts.cfg -@@ -22,6 +22,7 @@ - - verify PayPalEE:x - policy OID.2.16.840.1.114412.2.1 -+ at_time 2201010000Z - result pass - - verify BrAirWaysBadSig:x - diff --git a/nss-sql-man-page.patch b/nss-sql-man-page.patch deleted file mode 100644 index 1084856..0000000 --- a/nss-sql-man-page.patch +++ /dev/null @@ -1,749 +0,0 @@ -# HG changeset patch -# User Robert Relyea -# Date 1621548343 25200 -# Thu May 20 15:05:43 2021 -0700 -# Node ID 230ce820b8fd9bc542940a324388f6b2b55ecca8 -# Parent 207465bda46a4d6eb07ddef2a3a8232643ff027e -Bug 1712184 NSS tools manpages need to be updated to reflect that sqlite is the default database. - -update certutil.xml pk12util.xml modutil.xml and signver.xml to reflect the fact -the the sql database is default. Many of these also has examples of specifying -sql:dirname which is now the default. I did not replace them with dbm:dirname since -we don't want to encourage regressing back. The one exception is in the paragraph -explaining how to get to the old database format. - - -Differential Revision: https://phabricator.services.mozilla.com/D115658 - -diff --git a/doc/certutil.xml b/doc/certutil.xml ---- a/doc/certutil.xml -+++ b/doc/certutil.xml -@@ -203,17 +203,17 @@ If this option is not used, the validity - - Specify the database directory containing the certificate and key database files. - certutil supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). - NSS recognizes the following prefixes: - - sql: requests the newer database - dbm: requests the legacy database - -- If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then dbm: is the default. -+ If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then sql: is the default. - - - - - --dump-ext-val OID - For single cert, print binary DER encoding of extension OID. - - -@@ -843,23 +843,23 @@ Comma separated list of one or more of t - - secmod.db or pkcs11.txt - - - - - These databases must be created before certificates or keys can be generated. - --certutil -N -d [sql:]directory -+certutil -N -d directory - - Creating a Certificate Request - - A certificate request contains most or all of the information that is used to generate the final certificate. This request is submitted separately to a certificate authority and is then approved by some mechanism (automatically or by human review). Once the request is approved, then the certificate is generated. - --$ certutil -R -k key-type-or-id [-q pqgfile|curve-name] -g key-size -s subject [-h tokenname] -d [sql:]directory [-p phone] [-o output-file] [-a] -+$ certutil -R -k key-type-or-id [-q pqgfile|curve-name] -g key-size -s subject [-h tokenname] -d directory [-p phone] [-o output-file] [-a] - - The command options requires four arguments: - - - - - to specify either the key type to generate or, when renewing a certificate, the existing key pair to use - -@@ -881,27 +881,27 @@ Comma separated list of one or more of t - - - - The new certificate request can be output in ASCII format () or can be written to a specified file (). - - - For example: - --$ certutil -R -k rsa -g 1024 -s "CN=John Smith,O=Example Corp,L=Mountain View,ST=California,C=US" -d sql:$HOME/nssdb -p 650-555-0123 -a -o cert.cer -+$ certutil -R -k rsa -g 1024 -s "CN=John Smith,O=Example Corp,L=Mountain View,ST=California,C=US" -d $HOME/nssdb -p 650-555-0123 -a -o cert.cer - - Generating key. This may take a few moments... - - - - Creating a Certificate - - A valid certificate must be issued by a trusted CA. This can be done by specifying a CA certificate () that is stored in the certificate database. If a CA key pair is not available, you can create a self-signed certificate using the argument with the command option. - --$ certutil -S -k rsa|dsa|ec -n certname -s subject [-c issuer |-x] -t trustargs -d [sql:]directory [-m serial-number] [-v valid-months] [-w offset-months] [-p phone] [-1] [-2] [-3] [-4] [-5 keyword] [-6 keyword] [-7 emailAddress] [-8 dns-names] [--extAIA] [--extSIA] [--extCP] [--extPM] [--extPC] [--extIA] [--extSKID] -+$ certutil -S -k rsa|dsa|ec -n certname -s subject [-c issuer |-x] -t trustargs -d directory [-m serial-number] [-v valid-months] [-w offset-months] [-p phone] [-1] [-2] [-3] [-4] [-5 keyword] [-6 keyword] [-7 emailAddress] [-8 dns-names] [--extAIA] [--extSIA] [--extCP] [--extPM] [--extPC] [--extIA] [--extSKID] - - The series of numbers and options set certificate extensions that can be added to the certificate when it is generated by the CA. Interactive prompts will result. - - - For example, this creates a self-signed certificate: - - $ certutil -S -s "CN=Example CA" -n my-ca-cert -x -t "C,C,C" -1 -2 -5 -m 3650 - -@@ -911,55 +911,55 @@ The interative prompts for key usage and - From there, new certificates can reference the self-signed certificate: - - $ certutil -S -s "CN=My Server Cert" -n my-server-cert -c "my-ca-cert" -t ",," -1 -5 -6 -8 -m 730 - - Generating a Certificate from a Certificate Request - - When a certificate request is created, a certificate can be generated by using the request and then referencing a certificate authority signing certificate (the issuer specified in the argument). The issuing certificate must be in the certificate database in the specified directory. - --certutil -C -c issuer -i cert-request-file -o output-file [-m serial-number] [-v valid-months] [-w offset-months] -d [sql:]directory [-1] [-2] [-3] [-4] [-5 keyword] [-6 keyword] [-7 emailAddress] [-8 dns-names] -+certutil -C -c issuer -i cert-request-file -o output-file [-m serial-number] [-v valid-months] [-w offset-months] -d directory [-1] [-2] [-3] [-4] [-5 keyword] [-6 keyword] [-7 emailAddress] [-8 dns-names] - - For example: - --$ certutil -C -c "my-ca-cert" -i /home/certs/cert.req -o cert.cer -m 010 -v 12 -w 1 -d sql:$HOME/nssdb -1 nonRepudiation,dataEncipherment -5 sslClient -6 clientAuth -7 jsmith@example.com -+$ certutil -C -c "my-ca-cert" -i /home/certs/cert.req -o cert.cer -m 010 -v 12 -w 1 -d $HOME/nssdb -1 nonRepudiation,dataEncipherment -5 sslClient -6 clientAuth -7 jsmith@example.com - - Listing Certificates - - The command option lists all of the certificates listed in the certificate database. The path to the directory () is required. - --$ certutil -L -d sql:/home/my/sharednssdb -+$ certutil -L -d /home/my/sharednssdb - - Certificate Nickname Trust Attributes - SSL,S/MIME,JAR/XPI - - CA Administrator of Instance pki-ca1's Example Domain ID u,u,u - TPS Administrator's Example Domain ID u,u,u - Google Internet Authority ,, - Certificate Authority - Example Domain CT,C,C - - Using additional arguments with can return and print the information for a single, specific certificate. For example, the argument passes the certificate name, while the argument prints the certificate in ASCII format: - - --$ certutil -L -d sql:$HOME/nssdb -a -n my-ca-cert -+$ certutil -L -d $HOME/nssdb -a -n my-ca-cert - -----BEGIN CERTIFICATE----- - MIIB1DCCAT2gAwIBAgICDkIwDQYJKoZIhvcNAQEFBQAwFTETMBEGA1UEAxMKRXhh - bXBsZSBDQTAeFw0xMzAzMTMxOTEwMjlaFw0xMzA2MTMxOTEwMjlaMBUxEzARBgNV - BAMTCkV4YW1wbGUgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJ4Kzqvz - JyBVgFqDXRYSyTBNw1DrxUU/3GvWA/ngjAwHEv0Cul/6sO/gsCvnABHiH6unns6x - XRzPORlC2WY3gkk7vmlsLvYpyecNazAi/NAwVnU/66HOsaoVFWE+gBQo99UrN2yk - 0BiK/GMFlLm5dXQROgA9ZKKyFdI0LIXtf6SbAgMBAAGjMzAxMBEGCWCGSAGG+EIB - AQQEAwIHADAMBgNVHRMEBTADAQH/MA4GA1UdDwEB/wQEAwICBDANBgkqhkiG9w0B - AQUFAAOBgQA6chkzkACN281d1jKMrc+RHG2UMaQyxiteaLVZO+Ro1nnRUvseDf09 - XKYFwPMJjWCihVku6bw/ihZfuMHhxK22Nue6inNQ6eDu7WmrqL8z3iUrQwxs+WiF - ob2rb8XRVVJkzXdXxlk4uo3UtNvw8sAz7sWD71qxKaIHU5q49zijfg== - -----END CERTIFICATE----- - - For a human-readable display --$ certutil -L -d sql:$HOME/nssdb -n my-ca-cert -+$ certutil -L -d $HOME/nssdb -n my-ca-cert - Certificate: - Data: - Version: 3 (0x2) - Serial Number: 3650 (0xe42) - Signature Algorithm: PKCS #1 SHA-1 With RSA Encryption - Issuer: "CN=Example CA" - Validity: - Not Before: Wed Mar 13 19:10:29 2013 -@@ -1022,17 +1022,17 @@ Certificate: - - Listing Keys - - Keys are the original material used to encrypt certificate data. The keys generated for certificates are stored separately, in the key database. - - - To list all keys in the database, use the command option and the (required) argument to give the path to the directory. - --$ certutil -K -d sql:$HOME/nssdb -+$ certutil -K -d $HOME/nssdb - certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services " - < 0> rsa 455a6673bde9375c2887ec8bf8016b3f9f35861d Thawte Freemail Member's Thawte Consulting (Pty) Ltd. ID - < 1> rsa 40defeeb522ade11090eacebaaf1196a172127df Example Domain Administrator Cert - < 2> rsa 1d0b06f44f6c03842f7d4f4a1dc78b3bcd1b85a5 John Smith user cert - - There are ways to narrow the keys listed in the search results: - - -@@ -1052,111 +1052,111 @@ certutil: Checking token "NSS Certificat - - - - - Listing Security Modules - - The devices that can be used to store certificates -- both internal databases and external devices like smart cards -- are recognized and used by loading security modules. The command option lists all of the security modules listed in the secmod.db database. The path to the directory () is required. - --$ certutil -U -d sql:/home/my/sharednssdb -+$ certutil -U -d /home/my/sharednssdb - - slot: NSS User Private Key and Certificate Services - token: NSS Certificate DB - uri: pkcs11:token=NSS%20Certificate%20DB;manufacturer=Mozilla%20Foundation;serial=0000000000000000;model=NSS%203 - - slot: NSS Internal Cryptographic Services - token: NSS Generic Crypto Services - uri: pkcs11:token=NSS%20Generic%20Crypto%20Services;manufacturer=Mozilla%20Foundation;serial=0000000000000000;model=NSS%203 - - Adding Certificates to the Database - - Existing certificates or certificate requests can be added manually to the certificate database, even if they were generated elsewhere. This uses the command option. - --certutil -A -n certname -t trustargs -d [sql:]directory [-a] [-i input-file] -+certutil -A -n certname -t trustargs -d directory [-a] [-i input-file] - - For example: - --$ certutil -A -n "CN=My SSL Certificate" -t ",," -d sql:/home/my/sharednssdb -i /home/example-certs/cert.cer -+$ certutil -A -n "CN=My SSL Certificate" -t ",," -d /home/my/sharednssdb -i /home/example-certs/cert.cer - - A related command option, , is used specifically to add email certificates to the certificate database. The command has the same arguments as the command. The trust arguments for certificates have the format SSL,S/MIME,Code-signing, so the middle trust settings relate most to email certificates (though the others can be set). For example: - --$ certutil -E -n "CN=John Smith Email Cert" -t ",P," -d sql:/home/my/sharednssdb -i /home/example-certs/email.cer -+$ certutil -E -n "CN=John Smith Email Cert" -t ",P," -d /home/my/sharednssdb -i /home/example-certs/email.cer - - Deleting Certificates to the Database - - Certificates can be deleted from a database using the option. The only required options are to give the security database directory and to identify the certificate nickname. - --certutil -D -d [sql:]directory -n "nickname" -+certutil -D -d directory -n "nickname" - - For example: - --$ certutil -D -d sql:/home/my/sharednssdb -n "my-ssl-cert" -+$ certutil -D -d /home/my/sharednssdb -n "my-ssl-cert" - - Validating Certificates - - A certificate contains an expiration date in itself, and expired certificates are easily rejected. However, certificates can also be revoked before they hit their expiration date. Checking whether a certificate has been revoked requires validating the certificate. Validation can also be used to ensure that the certificate is only used for the purposes it was initially issued for. Validation is carried out by the command option. - --certutil -V -n certificate-name [-b time] [-e] [-u cert-usage] -d [sql:]directory -+certutil -V -n certificate-name [-b time] [-e] [-u cert-usage] -d directory - - For example, to validate an email certificate: - --$ certutil -V -n "John Smith's Email Cert" -e -u S,R -d sql:/home/my/sharednssdb -+$ certutil -V -n "John Smith's Email Cert" -e -u S,R -d /home/my/sharednssdb - - Modifying Certificate Trust Settings - - The trust settings (which relate to the operations that a certificate is allowed to be used for) can be changed after a certificate is created or added to the database. This is especially useful for CA certificates, but it can be performed for any type of certificate. - --certutil -M -n certificate-name -t trust-args -d [sql:]directory -+certutil -M -n certificate-name -t trust-args -d directory - - For example: - --$ certutil -M -n "My CA Certificate" -d sql:/home/my/sharednssdb -t "CT,CT,CT" -+$ certutil -M -n "My CA Certificate" -d /home/my/sharednssdb -t "CT,CT,CT" - - Printing the Certificate Chain - - Certificates can be issued in chains because every certificate authority itself has a certificate; when a CA issues a certificate, it essentially stamps that certificate with its own fingerprint. The prints the full chain of a certificate, going from the initial CA (the root CA) through ever intermediary CA to the actual certificate. For example, for an email certificate with two CAs in the chain: - --$ certutil -d sql:/home/my/sharednssdb -O -n "jsmith@example.com" -+$ certutil -d /home/my/sharednssdb -O -n "jsmith@example.com" - "Builtin Object Token:Thawte Personal Freemail CA" [E=personal-freemail@thawte.com,CN=Thawte Personal Freemail CA,OU=Certification Services Division,O=Thawte Consulting,L=Cape Town,ST=Western Cape,C=ZA] - - "Thawte Personal Freemail Issuing CA - Thawte Consulting" [CN=Thawte Personal Freemail Issuing CA,O=Thawte Consulting (Pty) Ltd.,C=ZA] - - "(null)" [E=jsmith@example.com,CN=Thawte Freemail Member] - - Resetting a Token - - The device which stores certificates -- both external hardware devices and internal software databases -- can be blanked and reused. This operation is performed on the device which stores the data, not directly on the security databases, so the location must be referenced through the token name () as well as any directory path. If there is no external token used, the default value is internal. - --certutil -T -d [sql:]directory -h token-name -0 security-officer-password -+certutil -T -d directory -h token-name -0 security-officer-password - - Many networks have dedicated personnel who handle changes to security tokens (the security officer). This person must supply the password to access the specified token. For example: - --$ certutil -T -d sql:/home/my/sharednssdb -h nethsm -0 secret -+$ certutil -T -d /home/my/sharednssdb -h nethsm -0 secret - - Upgrading or Merging the Security Databases - - Many networks or applications may be using older BerkeleyDB versions of the certificate database (cert8.db). Databases can be upgraded to the new SQLite version of the database (cert9.db) using the command option or existing databases can be merged with the new cert9.db databases using the command. - - - The command must give information about the original database and then use the standard arguments (like ) to give the information about the new databases. The command also requires information that the tool uses for the process to upgrade and write over the original database. - --certutil --upgrade-merge -d [sql:]directory [-P dbprefix] --source-dir directory --source-prefix dbprefix --upgrade-id id --upgrade-token-name name [-@ password-file] -+certutil --upgrade-merge -d directory [-P dbprefix] --source-dir directory --source-prefix dbprefix --upgrade-id id --upgrade-token-name name [-@ password-file] - - For example: - --$ certutil --upgrade-merge -d sql:/home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp- --upgrade-id 1 --upgrade-token-name internal -+$ certutil --upgrade-merge -d /home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp- --upgrade-id 1 --upgrade-token-name internal - - The command only requires information about the location of the original database; since it doesn't change the format of the database, it can write over information without performing interim step. - --certutil --merge -d [sql:]directory [-P dbprefix] --source-dir directory --source-prefix dbprefix [-@ password-file] -+certutil --merge -d directory [-P dbprefix] --source-dir directory --source-prefix dbprefix [-@ password-file] - - For example: - --$ certutil --merge -d sql:/home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp- -+$ certutil --merge -d /home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp- - - Running certutil Commands from a Batch File - - A series of commands can be run sequentially from a text file with the command option. The only argument for this specifies the input file. - - $ certutil -B -i /path/to/batch-file - - -@@ -1202,27 +1202,26 @@ BerkeleyDB. These new databases provide - - pkcs11.txt, a listing of all of the PKCS #11 modules, contained in a new subdirectory in the security databases directory - - - - - Because the SQLite databases are designed to be shared, these are the shared database type. The shared database type is preferred; the legacy format is included for backward compatibility. - --By default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type. --Using the SQLite databases must be manually specified by using the sql: prefix with the given security directory. For example: -+By default, the tools (certutil, pk12util, modutil) assume that the given security databases use the SQLite type. -+Using the legacy databases must be manually specified by using the dbm: prefix with the given security directory. For example: - --$ certutil -L -d sql:/home/my/sharednssdb -+$ certutil -L -d dbm:/home/my/sharednssdb - --To set the shared database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to sql: --export NSS_DEFAULT_DB_TYPE="sql" -+To set the legacy database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to dbm: -+export NSS_DEFAULT_DB_TYPE="dbm" - - This line can be set added to the ~/.bashrc file to make the change permanent. - --Most applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases: - - - - https://wiki.mozilla.org/NSS_Shared_DB_Howto - - - For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: - -diff --git a/doc/modutil.xml b/doc/modutil.xml ---- a/doc/modutil.xml -+++ b/doc/modutil.xml -@@ -144,24 +144,24 @@ - - - - -ciphers cipher-enable-list - Enable specific ciphers in a module that is being added to the database. The cipher-enable-list is a colon-delimited list of cipher names. Enclose this list in quotation marks if it contains spaces. - - - -- -dbdir [sql:]directory -+ -dbdir directory - Specify the database directory in which to access or create security module database files. -- modutil supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix sql: is not used, then the tool assumes that the given databases are in the old format. -+ modutil supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix dbm: is not used, then the tool assumes that the given databases are in SQLite format. - - - - --dbprefix prefix -- Specify the prefix used on the database files, such as my_ for my_cert8.db. This option is provided as a special case. Changing the names of the certificate and key databases is not recommended. -+ Specify the prefix used on the database files, such as my_ for my_cert9.db. This option is provided as a special case. Changing the names of the certificate and key databases is not recommended. - - - - -installdir root-installation-directory - Specify the root installation directory relative to which files will be installed by the option. This directory should be one below which it is appropriate to store dynamic library files, such as a server's root directory. - - - -@@ -224,23 +224,23 @@ - - - - - Usage and Examples - - Creating Database Files - Before any operations can be performed, there must be a set of security databases available. modutil can be used to create these files. The only required argument is the database that where the databases will be located. --modutil -create -dbdir [sql:]directory -+modutil -create -dbdir directory - - Adding a Cryptographic Module - Adding a PKCS #11 module means submitting a supporting library file, enabling its ciphers, and setting default provider status for various security mechanisms. This can be done by supplying all of the information through modutil directly or by running a JAR file and install script. For the most basic case, simply upload the library: - modutil -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] - For example: --modutil -dbdir sql:/home/my/sharednssdb -add "Example PKCS #11 Module" -libfile "/tmp/crypto.so" -mechanisms RSA:DSA:RC2:RANDOM -+modutil -dbdir /home/my/sharednssdb -add "Example PKCS #11 Module" -libfile "/tmp/crypto.so" -mechanisms RSA:DSA:RC2:RANDOM - - Using database directory ... - Module "Example PKCS #11 Module" added to database. - - - - Installing a Cryptographic Module from a JAR File - PKCS #11 modules can also be loaded using a JAR file, which contains all of the required libraries and an installation script that describes how to install the module. The JAR install script is described in more detail in . -@@ -262,17 +262,17 @@ Module "Example PKCS #11 Module" added t - } - } - Linux:6.0.0:x86 { - EquivalentPlatform { Linux:5.4.08:x86 } - } - } - Both the install script and the required libraries must be bundled in a JAR file, which is specified with the argument. - --modutil -dbdir sql:/home/mt"jar-install-filey/sharednssdb -jar install.jar -installdir sql:/home/my/sharednssdb -+modutil -dbdir /home/mt"jar-install-filey/sharednssdb -jar install.jar -installdir /home/my/sharednssdb - - This installation JAR file was signed by: - ---------------------------------------------- - - **SUBJECT NAME** - - C=US, ST=California, L=Mountain View, CN=Cryptorific Inc., OU=Digital ID - Class 3 - Netscape Object Signing, OU="www.verisign.com/repository/CPS -@@ -299,42 +299,42 @@ Installation completed successfully Adding Module Spec - Each module has information stored in the security database about its configuration and parameters. These can be added or edited using the command. For the current settings or to see the format of the module spec in the database, use the option. - modutil -rawadd modulespec - - - Deleting a Module - A specific PKCS #11 module can be deleted from the secmod.db database: --modutil -delete modulename -dbdir [sql:]directory -+modutil -delete modulename -dbdir directory - - Displaying Module Information - The secmod.db database contains information about the PKCS #11 modules that are available to an application or server to use. The list of all modules, information about specific modules, and database configuration specs for modules can all be viewed. - To simply get a list of modules in the database, use the command. --modutil -list [modulename] -dbdir [sql:]directory -+modutil -list [modulename] -dbdir directory - Listing the modules shows the module name, their status, and other associated security databases for certificates and keys. For example: - --modutil -list -dbdir sql:/home/my/sharednssdb -+modutil -list -dbdir /home/my/sharednssdb - - Listing of PKCS #11 Modules - ----------------------------------------------------------- - 1. NSS Internal PKCS #11 Module - slots: 2 slots attached - status: loaded - - slot: NSS Internal Cryptographic Services - token: NSS Generic Crypto Services - uri: pkcs11:token=NSS%20Generic%20Crypto%20Services;manufacturer=Mozilla%20Foundation;serial=0000000000000000;model=NSS%203 - - slot: NSS User Private Key and Certificate Services - token: NSS Certificate DB - uri: pkcs11:token=NSS%20Certificate%20DB;manufacturer=Mozilla%20Foundation;serial=0000000000000000;model=NSS%203 - ----------------------------------------------------------- - Passing a specific module name with the returns details information about the module itself, like supported cipher mechanisms, version numbers, serial numbers, and other information about the module and the token it is loaded on. For example: -- modutil -list "NSS Internal PKCS #11 Module" -dbdir sql:/home/my/sharednssdb -+ modutil -list "NSS Internal PKCS #11 Module" -dbdir /home/my/sharednssdb - - ----------------------------------------------------------- - Name: NSS Internal PKCS #11 Module - Library file: **Internal ONLY module** - Manufacturer: Mozilla Foundation - Description: NSS Internal Crypto Services - PKCS #11 Version 2.20 - Library Version: 3.11 -@@ -370,17 +370,17 @@ Default Mechanism Flags: RSA:RC2:RC4:DES - Token Model: NSS 3 - Token Serial Number: 0000000000000000 - Token Version: 8.3 - Token Firmware Version: 0.0 - Access: NOT Write Protected - Login Type: Login required - User Pin: Initialized - A related command, returns information about the database configuration for the modules. (This information can be edited by loading new specs using the command.) -- modutil -rawlist -dbdir sql:/home/my/sharednssdb -+ modutil -rawlist -dbdir /home/my/sharednssdb - name="NSS Internal PKCS #11 Module" parameters="configdir=. certPrefix= keyPrefix= secmod=secmod.db flags=readOnly " NSS="trustOrder=75 cipherOrder=100 slotParams={0x00000001=[slotFlags=RSA,RC4,RC2,DES,DH,SHA1,MD5,MD2,SSL,TLS,AES,RANDOM askpw=any timeout=30 ] } Flags=internal,critical" - - Setting a Default Provider for Security Mechanisms - Multiple security modules may provide support for the same security mechanisms. It is possible to set a specific security module as the default provider for a specific security mechanism (or, conversely, to prohibit a provider from supplying those mechanisms). - modutil -default modulename -mechanisms mechanism-list - To set a module as the default provider for mechanisms, use the command with a colon-separated list of mechanisms. The available mechanisms depend on the module; NSS supplies almost all common mechanisms. For example: - modutil -default "NSS Internal PKCS #11 Module" -dbdir -mechanisms RSA:DSA:RC2 - -@@ -398,29 +398,29 @@ Successfully changed defaults.For example: - modutil -enable "NSS Internal PKCS #11 Module" -slot "NSS Internal Cryptographic Services " -dbdir . - - Slot "NSS Internal Cryptographic Services " enabled. - Be sure that the appropriate amount of trailing whitespace is after the slot name. Some slot names have a significant amount of whitespace that must be included, or the operation will fail. - - Enabling and Verifying FIPS Compliance - The NSS modules can have FIPS 140-2 compliance enabled or disabled using modutil with the option. For example: --modutil -fips true -dbdir sql:/home/my/sharednssdb/ -+modutil -fips true -dbdir /home/my/sharednssdb/ - - FIPS mode enabled. - To verify that status of FIPS mode, run the command with either a true or false flag (it doesn't matter which). The tool returns the current FIPS setting. --modutil -chkfips false -dbdir sql:/home/my/sharednssdb/ -+modutil -chkfips false -dbdir /home/my/sharednssdb/ - - FIPS mode enabled. - - Changing the Password on a Token - - Initializing or changing a token's password: - modutil -changepw tokenname [-pwfile old-password-file] [-newpwfile new-password-file] --modutil -dbdir sql:/home/my/sharednssdb -changepw "NSS Certificate DB" -+modutil -dbdir /home/my/sharednssdb -changepw "NSS Certificate DB" - - Enter old password: - Incorrect password, try again... - Enter old password: - Enter new password: - Re-enter new password: - Token "Communicator Certificate DB" password changed successfully. - -@@ -684,27 +684,26 @@ BerkleyDB. These new databases provide m - - pkcs11.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory - - - - - Because the SQLite databases are designed to be shared, these are the shared database type. The shared database type is preferred; the legacy format is included for backward compatibility. - --By default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type. --Using the SQLite databases must be manually specified by using the sql: prefix with the given security directory. For example: -+By default, the tools (certutil, pk12util, modutil) assume that the given security databases use the SQLite type. -+Using the legacy databases must be manually specified by using the dbm: prefix with the given security directory. For example: - --modutil -create -dbdir sql:/home/my/sharednssdb -+modutil -create -dbdir dbm:/home/my/sharednssdb - --To set the shared database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to sql: --export NSS_DEFAULT_DB_TYPE="sql" -+To set the legacy database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to dbm: -+export NSS_DEFAULT_DB_TYPE="dbm" - - This line can be added to the ~/.bashrc file to make the change permanent for the user. - --Most applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases: - - - - https://wiki.mozilla.org/NSS_Shared_DB_Howto - - - For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: - -diff --git a/doc/pk12util.xml b/doc/pk12util.xml ---- a/doc/pk12util.xml -+++ b/doc/pk12util.xml -@@ -25,17 +25,17 @@ - - - - - pk12util - -i p12File|-l p12File|-o p12File - -c keyCipher - -C certCipher -- -d [sql:]directory -+ -d directory - -h tokenname - -m | --key-len keyLength - -M hashAlg - -n certname - -P dbprefix - -r - -v - --cert-key-len certKeyLength -@@ -83,19 +83,19 @@ - - - - -C certCipher - Specify the certiticate encryption algorithm. - - - -- -d [sql:]directory -+ -d directory - Specify the database directory into which to import to or export from certificates and keys. -- pk12util supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix sql: is not used, then the tool assumes that the given databases are in the old format. -+ pk12util supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix dbm: is not used, then the tool assumes that the given databases are in the SQLite format. - - - - -h tokenname - Specify the name of the token to import into or export from. - - - -@@ -244,44 +244,44 @@ - - - - Examples - Importing Keys and Certificates - The most basic usage of pk12util for importing a certificate or key is the PKCS #12 input file () and some way to specify the security database being accessed (either for a directory or for a token). - - -- pk12util -i p12File [-h tokenname] [-v] [-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword] -+ pk12util -i p12File [-h tokenname] [-v] [-d directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword] - - For example: - -- # pk12util -i /tmp/cert-files/users.p12 -d sql:/home/my/sharednssdb -+ # pk12util -i /tmp/cert-files/users.p12 -d /home/my/sharednssdb - - Enter a password which will be used to encrypt your keys. - The password should be at least 8 characters long, - and should contain at least one non-alphabetic character. - - Enter new password: - Re-enter password: - Enter password for PKCS12 file: - pk12util: PKCS12 IMPORT SUCCESSFUL - - Exporting Keys and Certificates - Using the pk12util command to export certificates and keys requires both the name of the certificate to extract from the database () and the PKCS #12-formatted output file to write to. There are optional parameters that can be used to encrypt the file to protect the certificate material. - -- pk12util -o p12File -n certname [-c keyCipher] [-C certCipher] [-m|--key_len keyLen] [-n|--cert_key_len certKeyLen] [-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword] -+ pk12util -o p12File -n certname [-c keyCipher] [-C certCipher] [-m|--key_len keyLen] [-n|--cert_key_len certKeyLen] [-d directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword] - For example: -- # pk12util -o certs.p12 -n Server-Cert -d sql:/home/my/sharednssdb -+ # pk12util -o certs.p12 -n Server-Cert -d /home/my/sharednssdb - Enter password for PKCS12 file: - Re-enter password: - - Listing Keys and Certificates - The information in a .p12 file are not human-readable. The certificates and keys in the file can be printed (listed) in a human-readable pretty-print format that shows information for every certificate and any public keys in the .p12 file. - -- pk12util -l p12File [-h tokenname] [-r] [-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword] -+ pk12util -l p12File [-h tokenname] [-r] [-d directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword] - For example, this prints the default ASCII output: - # pk12util -l certs.p12 - - Enter password for PKCS12 file: - Key(shrouded): - Friendly Name: Thawte Freemail Member's Thawte Consulting (Pty) Ltd. ID - - Encryption algorithm: PKCS #12 V2 PBE With SHA-1 And 3KEY Triple DES-CBC -@@ -389,27 +389,26 @@ BerkleyDB. These new databases provide m - - pkcs11.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory - - - - - Because the SQLite databases are designed to be shared, these are the shared database type. The shared database type is preferred; the legacy format is included for backward compatibility. - --By default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type. --Using the SQLite databases must be manually specified by using the sql: prefix with the given security directory. For example: -+By default, the tools (certutil, pk12util, modutil) assume that the given security databases use the SQLite type -+Using the legacy databases must be manually specified by using the dbm: prefix with the given security directory. For example: - --# pk12util -i /tmp/cert-files/users.p12 -d sql:/home/my/sharednssdb -+# pk12util -i /tmp/cert-files/users.p12 -d dbm:/home/my/sharednssdb - --To set the shared database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to sql: --export NSS_DEFAULT_DB_TYPE="sql" -+To set the legacy database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to dbm: -+export NSS_DEFAULT_DB_TYPE="dbm" - - This line can be set added to the ~/.bashrc file to make the change permanent. - --Most applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases: - - - - https://wiki.mozilla.org/NSS_Shared_DB_Howto - - - For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: - -diff --git a/doc/signver.xml b/doc/signver.xml ---- a/doc/signver.xml -+++ b/doc/signver.xml -@@ -59,19 +59,19 @@ - -A - Displays all of the information in the PKCS#7 signature. - - - -V - Verifies the digital signature. - - -- -d [sql:]directory -+ -d directory - Specify the database directory which contains the certificates and keys. -- signver supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix sql: is not used, then the tool assumes that the given databases are in the old format. -+ signver supports two types of databases: the legacy security databases (cert8.db, key3.db, and secmod.db) and new SQLite databases (cert9.db, key4.db, and pkcs11.txt). If the prefix dbm: is not used, then the tool assumes that the given databases are in the SQLite format. - - - -a - Sets that the given signature file is in ASCII format. - - - -i input_file - Gives the input file for the object with signed data. -@@ -90,17 +90,17 @@ - - - - - - Extended Examples - Verifying a Signature - The option verifies that the signature in a given signature file is valid when used to sign the given object (from the input file). --signver -V -s signature_file -i signed_file -d sql:/home/my/sharednssdb -+signver -V -s signature_file -i signed_file -d /home/my/sharednssdb - - signatureValid=yes - - - Printing Signature Data - - The option prints all of the information contained in a signature file. Using the option prints the signature file information to the given output file rather than stdout. - -@@ -150,27 +150,26 @@ BerkleyDB. These new databases provide m - - pkcs11.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory - - - - - Because the SQLite databases are designed to be shared, these are the shared database type. The shared database type is preferred; the legacy format is included for backward compatibility. - --By default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type. --Using the SQLite databases must be manually specified by using the sql: prefix with the given security directory. For example: -+By default, the tools (certutil, pk12util, modutil) assume that the given security databases use the SQLite type -+Using the legacy databases must be manually specified by using the dbm: prefix with the given security directory. For example: - --# signver -A -s signature -d sql:/home/my/sharednssdb -+# signver -A -s signature -d dbm:/home/my/sharednssdb - --To set the shared database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to sql: --export NSS_DEFAULT_DB_TYPE="sql" -+To set the legacy database type as the default type for the tools, set the NSS_DEFAULT_DB_TYPE environment variable to dbm: -+export NSS_DEFAULT_DB_TYPE="dbm" - - This line can be added to the ~/.bashrc file to make the change permanent for the user. - --Most applications do not use the shared database by default, but they can be configured to use them. For example, this how-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases: - - - - https://wiki.mozilla.org/NSS_Shared_DB_Howto - - - For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: - diff --git a/nss.spec b/nss.spec index 497c0b0..92d3e15 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.85.0 +%global nss_version 3.87.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+1] +%global nspr_release %[%baserelease+2] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -131,9 +131,6 @@ Patch12: nss-signtool-format.patch # fedora disabled dbm by default Patch40: nss-no-dbm-man-page.patch -# upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=1774654 -Patch50: nss-3.79-fix-client-cert-crash.patch - Patch100: nspr-config-pc.patch Patch101: nspr-gcc-atomics.patch @@ -1090,6 +1087,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Jan 10 2023 Frantisek Krenzelok - 3.87.0-1 +- Update NSS to 3.87 & remove unused patches + * Thu Nov 17 2022 Bob Relyea - 3.85.0-1 - update to NSS 3.85 diff --git a/sources b/sources index c9d91e9..48fb43b 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nss-3.85.tar.gz) = 97cfffa2beed1dba5d31e0c6e450553e5a8c78b427521640adb00c05d9d63cd64dc08388f0dbf96c93efb79f5daf4ba8db8d026b0b43d2e5c865a9b833fc77a1 SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f +SHA512 (nss-3.87.tar.gz) = 4ec7b94e537df109638b821f3a7e3b7bf31d89c3739a6e4c85cad4fab876390ae482971d6f66198818400f467661e86f39dc1d2a4a88077fd81e3a0b7ed64110 From 4e8c40829c1fbcf6be39f552237889ac48d7c0d3 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Fri, 10 Feb 2023 16:42:33 +0100 Subject: [PATCH 04/19] Update NSS to 3.88.1 Signed-off-by: Frantisek Krenzelok --- .gitignore | 1 + nss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 73aa652..e89f80b 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,4 @@ TestUser51.cert /nspr-4.35.tar.gz /nss-3.85.tar.gz /nss-3.87.tar.gz +/nss-3.88.1.tar.gz diff --git a/nss.spec b/nss.spec index 92d3e15..14ac4d9 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.87.0 +%global nss_version 3.88.1 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+2] +%global nspr_release %[%baserelease+3] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1087,6 +1087,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Fri Feb 10 2023 Frantisek Krenzelok - 3.88.1-1 +- Update NSS to 3.88.1 + * Tue Jan 10 2023 Frantisek Krenzelok - 3.87.0-1 - Update NSS to 3.87 & remove unused patches diff --git a/sources b/sources index 48fb43b..d91999e 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f -SHA512 (nss-3.87.tar.gz) = 4ec7b94e537df109638b821f3a7e3b7bf31d89c3739a6e4c85cad4fab876390ae482971d6f66198818400f467661e86f39dc1d2a4a88077fd81e3a0b7ed64110 +SHA512 (nss-3.88.1.tar.gz) = d15289803a4c3caa1b7a8872b761a95b4f571688c8b8ffaf2a1478e032a356fbcf8a9239ebe1777561503329f63dd237384e1d8af9ca70fb48b40e70954b455a From 010ac06c9844829a67f0b0ba3de8c1c7d4d26ec4 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Fri, 10 Mar 2023 12:37:17 +0100 Subject: [PATCH 05/19] Update NSS to 3.89.0 & remove unused patch Signed-off-by: Frantisek Krenzelok --- .gitignore | 1 + nss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e89f80b..36c04a5 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ TestUser51.cert /nss-3.85.tar.gz /nss-3.87.tar.gz /nss-3.88.1.tar.gz +/nss-3.89.tar.gz diff --git a/nss.spec b/nss.spec index 14ac4d9..18cf79f 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.88.1 +%global nss_version 3.89.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+3] +%global nspr_release %[%baserelease+4] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1087,6 +1087,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Fri Mar 10 2023 Frantisek Krenzelok - 3.89.0-1 +- Update NSS to 3.89.0 + * Fri Feb 10 2023 Frantisek Krenzelok - 3.88.1-1 - Update NSS to 3.88.1 diff --git a/sources b/sources index d91999e..1e9ca85 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f -SHA512 (nss-3.88.1.tar.gz) = d15289803a4c3caa1b7a8872b761a95b4f571688c8b8ffaf2a1478e032a356fbcf8a9239ebe1777561503329f63dd237384e1d8af9ca70fb48b40e70954b455a +SHA512 (nss-3.89.tar.gz) = 1db06d4575f2c16d2a0629007981211e714f99c014c0a6256dd33d0caf8c809ba8d5be204d018f9d1cc99b9fcd055ac1fb99b399486ed43c9cf3f55f2747de82 From f843731258934d80b19c1dde29af7d68904d45ef Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Fri, 5 May 2023 15:13:05 +0200 Subject: [PATCH 06/19] Use %{nss_version} explicitly insted of %{version} Use nss_version explicitly as version is overiden by nspr_version durring execution of spec Signed-off-by: Frantisek Krenzelok --- nss.spec | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/nss.spec b/nss.spec index 18cf79f..79174a5 100644 --- a/nss.spec +++ b/nss.spec @@ -144,7 +144,7 @@ v3 certificates, and other security standards. %package tools Summary: Tools for the Network Security Services -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{nss_version}-%{release} %description tools Network Security Services (NSS) is a set of libraries designed to @@ -161,7 +161,7 @@ Summary: System NSS Initialization # providing nss-system-init without version so that it can # be replaced by a better one, e.g. supplied by the os vendor Provides: nss-system-init -Requires: nss%{?_isa} = %{version}-%{release} +Requires: nss%{?_isa} = %{nss_version}-%{release} Requires(post): coreutils, sed %description sysinit @@ -172,8 +172,8 @@ any system or user configured modules. %package devel Summary: Development libraries for Network Security Services -Provides: nss-static = %{version}-%{release} -Requires: nss%{?_isa} = %{version}-%{release} +Provides: nss-static = %{nss_version}-%{release} +Requires: nss%{?_isa} = %{nss_version}-%{release} Requires: nss-util-devel Requires: nss-softokn-devel Requires: nspr-devel >= %{nspr_version} @@ -186,9 +186,9 @@ Header and Library files for doing development with Network Security Services. %package pkcs11-devel Summary: Development libraries for PKCS #11 (Cryptoki) using NSS -Provides: nss-pkcs11-devel-static = %{version}-%{release} -Requires: nss-devel = %{version}-%{release} -Requires: nss-softokn-freebl-devel = %{version}-%{release} +Provides: nss-pkcs11-devel-static = %{nss_version}-%{release} +Requires: nss-devel = %{nss_version}-%{release} +Requires: nss-softokn-freebl-devel = %{nss_version}-%{release} %description pkcs11-devel Library files for developing PKCS #11 modules using basic NSS @@ -204,7 +204,7 @@ Utilities for Network Security Services and the Softoken module %package util-devel Summary: Development libraries for Network Security Services Utilities -Requires: nss-util%{?_isa} = %{version}-%{release} +Requires: nss-util%{?_isa} = %{nss_version}-%{release} Requires: nspr-devel >= %{nspr_version} Requires: pkgconfig @@ -215,8 +215,8 @@ Header and library files for doing development with Network Security Services. %package softokn Summary: Network Security Services Softoken Module Requires: nspr >= %{nspr_version} -Requires: nss-util >= %{version}-%{release} -Requires: nss-softokn-freebl%{_isa} >= %{version}-%{release} +Requires: nss-util >= %{nss_version}-%{release} +Requires: nss-softokn-freebl%{_isa} >= %{nss_version}-%{release} %description softokn Network Security Services Softoken Cryptographic Module @@ -237,8 +237,8 @@ Install the nss-softokn-freebl package if you need the freebl library. %package softokn-freebl-devel Summary: Header and Library files for doing development with the Freebl library for NSS -Provides: nss-softokn-freebl-static = %{version}-%{release} -Requires: nss-softokn-freebl%{?_isa} = %{version}-%{release} +Provides: nss-softokn-freebl-static = %{nss_version}-%{release} +Requires: nss-softokn-freebl%{?_isa} = %{nss_version}-%{release} %description softokn-freebl-devel NSS Softoken Cryptographic Module Freebl Library Development Tools @@ -249,10 +249,10 @@ Developers should rely only on the officially supported NSS public API. %package softokn-devel Summary: Development libraries for Network Security Services -Requires: nss-softokn%{?_isa} = %{version}-%{release} -Requires: nss-softokn-freebl-devel%{?_isa} = %{version}-%{release} +Requires: nss-softokn%{?_isa} = %{nss_version}-%{release} +Requires: nss-softokn-freebl-devel%{?_isa} = %{nss_version}-%{release} Requires: nspr-devel >= %{nspr_version} -Requires: nss-util-devel >= %{version}-%{release} +Requires: nss-util-devel >= %{nss_version}-%{release} Requires: pkgconfig %description softokn-devel @@ -1087,6 +1087,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Fri May 5 2023 Frantisek Krenzelok - 3.89.0-1 +- replace %{version} with %{nss_version} as it version can be overiden. + * Fri Mar 10 2023 Frantisek Krenzelok - 3.89.0-1 - Update NSS to 3.89.0 From c0fa8a2b79916ef34caffe476810110e3b940c2e Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Fri, 5 May 2023 18:14:19 +0200 Subject: [PATCH 07/19] Combine nss and nspr source togeather Mozilla provides a package that has both utilities Signed-off-by: Frantisek Krenzelok --- .gitignore | 1 + nss.spec | 12 ++++++------ sources | 3 +-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 36c04a5..d85a5a4 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ TestUser51.cert /nss-3.87.tar.gz /nss-3.88.1.tar.gz /nss-3.89.tar.gz +/nss-3.89-with-nspr-4.35.tar.gz diff --git a/nss.spec b/nss.spec index 79174a5..3428629 100644 --- a/nss.spec +++ b/nss.spec @@ -57,6 +57,8 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", string.gsub(rpm.expand("%nss_archive_version"), "%.", "_"))) } +%global nss_nspr_archive nss-%{nss_archive_version}-with-nspr-%{nspr_archive_version} + Summary: Network Security Services Name: nss Version: %{nss_version} @@ -82,7 +84,7 @@ BuildRequires: psmisc BuildRequires: perl-interpreter BuildRequires: gcc-c++ -Source0: https://ftp.mozilla.org/pub/security/nss/releases/%{nss_release_tag}/src/%{name}-%{nss_archive_version}.tar.gz +Source0: https://ftp.mozilla.org/pub/security/nss/releases/%{nss_release_tag}/src/%{nss_nspr_archive}.tar.gz Source1: nss-util.pc.in Source2: nss-util-config.in Source3: nss-softokn.pc.in @@ -112,7 +114,6 @@ Source27: secmod.db.xml %endif Source28: nss-p11-kit.config -Source100: nspr-%{nspr_archive_version}.tar.gz Source101: nspr-config.xml # This patch uses the GCC -iquote option documented at @@ -285,12 +286,8 @@ Conflicts: filesystem < 3 %description -n nspr-devel Header files for doing development with the Netscape Portable Runtime. - %prep -%setup -q -T -b 100 -n nspr-%{nspr_archive_version} - %setup -q -T -b 0 -n %{name}-%{nss_archive_version} -mv ../nspr-%{nspr_archive_version}/nspr . cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in %patch100 -p0 -b .flags @@ -1087,6 +1084,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Fri May 5 2023 Frantisek Krenzelok - 3.89.0-1 +- combine nss and nspr source togeather + * Fri May 5 2023 Frantisek Krenzelok - 3.89.0-1 - replace %{version} with %{nss_version} as it version can be overiden. diff --git a/sources b/sources index 1e9ca85..90039d1 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f -SHA512 (nss-3.89.tar.gz) = 1db06d4575f2c16d2a0629007981211e714f99c014c0a6256dd33d0caf8c809ba8d5be204d018f9d1cc99b9fcd055ac1fb99b399486ed43c9cf3f55f2747de82 +SHA512 (nss-3.89-with-nspr-4.35.tar.gz) = 3c7fc3062baf577473001f6a2724bae14c809d725c4ae8d90a6de1ef84c6d1c2276efe09f4112241d7b3c32b0c6d529eb87739ca02b8002e3bed3081f06cdff4 From 69ae63108222ffffdef83a99664ab38e25793fa3 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Mon, 5 Jun 2023 11:01:36 +0200 Subject: [PATCH 08/19] Update NSS to 3.90.0 Signed-off-by: Frantisek Krenzelok --- .gitignore | 1 + nss-signtool-format.patch | 4 ++-- nss.spec | 7 +++++-- sources | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d85a5a4..9550e81 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,4 @@ TestUser51.cert /nss-3.88.1.tar.gz /nss-3.89.tar.gz /nss-3.89-with-nspr-4.35.tar.gz +/nss-3.90-with-nspr-4.35.tar.gz diff --git a/nss-signtool-format.patch b/nss-signtool-format.patch index 5f146f1..f81d35c 100644 --- a/nss-signtool-format.patch +++ b/nss-signtool-format.patch @@ -10,7 +10,7 @@ diff --git a/cmd/modutil/install.c b/cmd/modutil/install.c /* Recursively delete all entries in the directory */ while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) { -- sprintf(filename, "%s/%s", path, entry->name); +- snprintf(filename, sizeof(filename), "%s/%s", path, entry->name); + if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) { + PR_CloseDir(dir); + return -1; @@ -29,7 +29,7 @@ diff --git a/cmd/signtool/util.c b/cmd/signtool/util.c @@ -138,6 +138,12 @@ rm_dash_r(char *path) /* Recursively delete all entries in the directory */ while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) { - sprintf(filename, "%s/%s", path, entry->name); + snprintf(filename, sizeof(filename), "%s/%s", path, entry->name); + if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name +) >= sizeof(filename)) { + errorCount++; diff --git a/nss.spec b/nss.spec index 3428629..2f7c02d 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.89.0 +%global nss_version 3.90.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+4] +%global nspr_release %[%baserelease+0] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1084,6 +1084,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Mon Jun 5 2023 Frantisek Krenzelok - 3.90.0-1 +- Update NSS to 3.90.0 + * Fri May 5 2023 Frantisek Krenzelok - 3.89.0-1 - combine nss and nspr source togeather diff --git a/sources b/sources index 90039d1..126d634 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nss-3.89-with-nspr-4.35.tar.gz) = 3c7fc3062baf577473001f6a2724bae14c809d725c4ae8d90a6de1ef84c6d1c2276efe09f4112241d7b3c32b0c6d529eb87739ca02b8002e3bed3081f06cdff4 +SHA512 (nss-3.90-with-nspr-4.35.tar.gz) = cbc75af3d3e1bf084011d435f0957d134cb3d3d66dcee45f9712ed22b470035ba1e808fc6457e8dc0d8d8e168d77d1117a4373d42905130f76ea58217ff88e30 From 26c4a84b2da80529904bc9e025b5ddd912a07942 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Mon, 5 Jun 2023 13:46:43 +0200 Subject: [PATCH 09/19] Update %patch syntax The syntax was changed from `%patch` to `%patch ` Signed-off-by: Frantisek Krenzelok --- nss.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nss.spec b/nss.spec index 2f7c02d..0fd3afd 100644 --- a/nss.spec +++ b/nss.spec @@ -290,9 +290,9 @@ Header files for doing development with the Netscape Portable Runtime. %setup -q -T -b 0 -n %{name}-%{nss_archive_version} cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in -%patch100 -p0 -b .flags +%patch 100 -p0 -b .flags pushd nspr -%patch101 -p1 -b .gcc-atomics +%patch 101 -p1 -b .gcc-atomics popd pushd nss @@ -1084,6 +1084,10 @@ update-crypto-policies &> /dev/null || : %changelog + +* Mon Jun 5 2023 Frantisek Krenzelok - 3.90.0-1 +- Update %patch syntax + * Mon Jun 5 2023 Frantisek Krenzelok - 3.90.0-1 - Update NSS to 3.90.0 From 7778fa59f59340d8aa0b9c75bb93dc908745e0d7 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Tue, 6 Jun 2023 08:48:06 +0200 Subject: [PATCH 10/19] Fix: add condition for architecture specific assebly feature Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1836781 Additional bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1836925 Signed-off-by: Frantisek Krenzelok --- nss-3.90-DisablingASM.patch | 36 ++++++++++++++++++++++++++++++++++++ nss.spec | 7 +++++++ 2 files changed, 43 insertions(+) create mode 100644 nss-3.90-DisablingASM.patch diff --git a/nss-3.90-DisablingASM.patch b/nss-3.90-DisablingASM.patch new file mode 100644 index 0000000..3574a47 --- /dev/null +++ b/nss-3.90-DisablingASM.patch @@ -0,0 +1,36 @@ +diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile +--- a/lib/freebl/Makefile ++++ b/lib/freebl/Makefile +@@ -560,6 +560,9 @@ else + endif # Solaris for non-sparc family CPUs + endif # target == SunO + ++# As the result of the bug https://bugzilla.mozilla.org/show_bug.cgi?id=1836925 ++# we currently totally removing the support of Vale implementation of Curve25519 ++SUPPORTS_VALE_CURVE25519 = 0 + ifdef USE_64 + # no __int128 at least up to lcc 1.23 (pretending to be gcc5) + # NB: CC_NAME is not defined here +@@ -568,7 +571,6 @@ ifneq ($(shell $(CC) -? 2>&1 >/dev/null /dev/null || : %changelog +* Thu Jun 6 2023 Frantisek Krenzelok - 3.90.0-1 +- Add patch for https://bugzilla.mozilla.org/show_bug.cgi?id=1836781 & + https://bugzilla.mozilla.org/show_bug.cgi?id=1836925 * Mon Jun 5 2023 Frantisek Krenzelok - 3.90.0-1 - Update %patch syntax From 7e456ba0da3469b8c145f9de70ca0a838fb0158b Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Tue, 6 Jun 2023 12:49:30 +0200 Subject: [PATCH 11/19] Hotfix: previous commit 7778fa59 Signed-off-by: Frantisek Krenzelok --- nss-3.90-DisablingASM.patch | 45 +++++++++++++++++++++++++++---------- nss.spec | 2 +- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/nss-3.90-DisablingASM.patch b/nss-3.90-DisablingASM.patch index 3574a47..7d1a17f 100644 --- a/nss-3.90-DisablingASM.patch +++ b/nss-3.90-DisablingASM.patch @@ -1,17 +1,8 @@ diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile +index 74e8e65..8995752 100644 --- a/lib/freebl/Makefile +++ b/lib/freebl/Makefile -@@ -560,6 +560,9 @@ else - endif # Solaris for non-sparc family CPUs - endif # target == SunO - -+# As the result of the bug https://bugzilla.mozilla.org/show_bug.cgi?id=1836925 -+# we currently totally removing the support of Vale implementation of Curve25519 -+SUPPORTS_VALE_CURVE25519 = 0 - ifdef USE_64 - # no __int128 at least up to lcc 1.23 (pretending to be gcc5) - # NB: CC_NAME is not defined here -@@ -568,7 +571,6 @@ ifneq ($(shell $(CC) -? 2>&1 >/dev/null &1 >/dev/null /dev/null || : %changelog -* Thu Jun 6 2023 Frantisek Krenzelok - 3.90.0-1 +* Tue Jun 6 2023 Frantisek Krenzelok - 3.90.0-1 - Add patch for https://bugzilla.mozilla.org/show_bug.cgi?id=1836781 & https://bugzilla.mozilla.org/show_bug.cgi?id=1836925 From 65e5278aceea6be768c8fce739de0637432ab557 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Wed, 7 Jun 2023 15:12:56 +0200 Subject: [PATCH 12/19] Bump the nspr baserelease number --- nss.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nss.spec b/nss.spec index 89f84e8..5eb12f2 100644 --- a/nss.spec +++ b/nss.spec @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+0] +%global nspr_release %[%baserelease+5] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 From be7b5ff555cb15886bd6cc4a14545927931d1735 Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Tue, 13 Jun 2023 12:37:56 +0200 Subject: [PATCH 13/19] Explicitly specify the doc files for nspr-devel nspr-devel now contains only the nspr relevant docs instead of all the docs. Signed-off-by: Frantisek Krenzelok --- nss.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nss.spec b/nss.spec index 5eb12f2..bce7041 100644 --- a/nss.spec +++ b/nss.spec @@ -1084,7 +1084,7 @@ update-crypto-policies &> /dev/null || : %{_includedir}/nspr4 %{_libdir}/pkgconfig/nspr.pc %{_bindir}/nspr-config -%{_mandir}/man*/* +%doc %{_mandir}/man1/nspr-config.* %changelog From 65ad091a6a072c410e9e957a90a947767c2e31bd Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Tue, 4 Jul 2023 15:41:56 +0200 Subject: [PATCH 14/19] Update NSS to 3.91.0 Signed-off-by: Frantisek Krenzelok --- .gitignore | 1 + nss-3.90-DisablingASM.patch | 57 ------------------------------------- nss.spec | 11 ++++--- sources | 2 +- 4 files changed, 7 insertions(+), 64 deletions(-) delete mode 100644 nss-3.90-DisablingASM.patch diff --git a/.gitignore b/.gitignore index 9550e81..2577afd 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,4 @@ TestUser51.cert /nss-3.89.tar.gz /nss-3.89-with-nspr-4.35.tar.gz /nss-3.90-with-nspr-4.35.tar.gz +/nss-3.91-with-nspr-4.35.tar.gz diff --git a/nss-3.90-DisablingASM.patch b/nss-3.90-DisablingASM.patch deleted file mode 100644 index 7d1a17f..0000000 --- a/nss-3.90-DisablingASM.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile -index 74e8e65..8995752 100644 ---- a/lib/freebl/Makefile -+++ b/lib/freebl/Makefile -@@ -568,7 +568,6 @@ ifneq ($(shell $(CC) -? 2>&1 >/dev/null /dev/null || : %changelog +* Tue Jul 4 2023 Frantisek Krenzelok - 3.91.0-1 +- Update NSS to 3.91.0 + * Tue Jun 6 2023 Frantisek Krenzelok - 3.90.0-1 - Add patch for https://bugzilla.mozilla.org/show_bug.cgi?id=1836781 & https://bugzilla.mozilla.org/show_bug.cgi?id=1836925 diff --git a/sources b/sources index 126d634..e6a5c5c 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nss-3.90-with-nspr-4.35.tar.gz) = cbc75af3d3e1bf084011d435f0957d134cb3d3d66dcee45f9712ed22b470035ba1e808fc6457e8dc0d8d8e168d77d1117a4373d42905130f76ea58217ff88e30 +SHA512 (nss-3.91-with-nspr-4.35.tar.gz) = e408dacfa51522b254cc28abc9a2188a05a9d34367e2c770d2bfea0727c7e0073e335a0cdf86f990ab246c331d2c85e1f787c66a1f9aa2fbb0163e6021fb7a37 From 2d600ec89ac2461ed4638cb8e8739404a284a17b Mon Sep 17 00:00:00 2001 From: Frantisek Krenzelok Date: Tue, 1 Aug 2023 17:05:32 +0200 Subject: [PATCH 15/19] Update NSS to 3.92.0 Signed-off-by: Frantisek Krenzelok --- .gitignore | 1 + nss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2577afd..5db6588 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ TestUser51.cert /nss-3.89-with-nspr-4.35.tar.gz /nss-3.90-with-nspr-4.35.tar.gz /nss-3.91-with-nspr-4.35.tar.gz +/nss-3.92-with-nspr-4.35.tar.gz diff --git a/nss.spec b/nss.spec index 1dc291a..201158b 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.91.0 +%global nss_version 3.92.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+6] +%global nspr_release %[%baserelease+7] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1084,6 +1084,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Aug 1 2023 Frantisek Krenzelok - 3.92.0-1 +- Update NSS to 3.92.0 + * Tue Jul 4 2023 Frantisek Krenzelok - 3.91.0-1 - Update NSS to 3.91.0 diff --git a/sources b/sources index e6a5c5c..a90f69d 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nss-3.91-with-nspr-4.35.tar.gz) = e408dacfa51522b254cc28abc9a2188a05a9d34367e2c770d2bfea0727c7e0073e335a0cdf86f990ab246c331d2c85e1f787c66a1f9aa2fbb0163e6021fb7a37 +SHA512 (nss-3.92-with-nspr-4.35.tar.gz) = 72810b62cea08c40200ea499a478e05483fa2b336f516c15776beb1ad7f8e8a7b69da8ffb7688f2b50a4725c1973d1c34e53a94e55657d2c4496b593af8959b1 From a4d67943a372f257130a23f7f837d9af83c7a72e Mon Sep 17 00:00:00 2001 From: Krenzelok Frantisek Date: Thu, 31 Aug 2023 04:36:41 +0200 Subject: [PATCH 16/19] Update NSS to 3.93.0 --- .gitignore | 1 + nss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5db6588..5cfabf8 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ TestUser51.cert /nss-3.90-with-nspr-4.35.tar.gz /nss-3.91-with-nspr-4.35.tar.gz /nss-3.92-with-nspr-4.35.tar.gz +/nss-3.93-with-nspr-4.35.tar.gz diff --git a/nss.spec b/nss.spec index 201158b..dfce308 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.92.0 +%global nss_version 3.93.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+7] +%global nspr_release %[%baserelease+8] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1084,6 +1084,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Aug 31 2023 Frantisek Krenzelok - 3.93.0-1 +- Update NSS to 3.93.0 + * Tue Aug 1 2023 Frantisek Krenzelok - 3.92.0-1 - Update NSS to 3.92.0 diff --git a/sources b/sources index a90f69d..d342e47 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nss-3.92-with-nspr-4.35.tar.gz) = 72810b62cea08c40200ea499a478e05483fa2b336f516c15776beb1ad7f8e8a7b69da8ffb7688f2b50a4725c1973d1c34e53a94e55657d2c4496b593af8959b1 +SHA512 (nss-3.93-with-nspr-4.35.tar.gz) = efe85e09021ca363df35d092b32463b359b2a23fc6e761949e944ba4209b09bdf007fc69015086a278c999411d62b9dba6fbedfb8a7c962ed40e406de45bc28e From ec9f28148bd3b2f69d652a65730e3163974e8c17 Mon Sep 17 00:00:00 2001 From: Krenzelok Frantisek Date: Wed, 4 Oct 2023 08:07:50 +0200 Subject: [PATCH 17/19] Update NSS to 3.94.0 --- .gitignore | 1 + nss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5cfabf8..61e1690 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ TestUser51.cert /nss-3.91-with-nspr-4.35.tar.gz /nss-3.92-with-nspr-4.35.tar.gz /nss-3.93-with-nspr-4.35.tar.gz +/nss-3.94-with-nspr-4.35.tar.gz diff --git a/nss.spec b/nss.spec index dfce308..af55c38 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.35.0 -%global nss_version 3.93.0 +%global nss_version 3.94.0 # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only @@ -7,7 +7,7 @@ %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. -%global nspr_release %[%baserelease+8] +%global nspr_release %[%baserelease+9] # only need to update this as we added new # algorithms under nss policy control %global crypto_policies_version 20210118 @@ -1084,6 +1084,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Wed Oct 4 2023 Frantisek Krenzelok - 3.94.0-1 +- Update NSS to 3.94.0 + * Thu Aug 31 2023 Frantisek Krenzelok - 3.93.0-1 - Update NSS to 3.93.0 diff --git a/sources b/sources index d342e47..fa784d4 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 -SHA512 (nss-3.93-with-nspr-4.35.tar.gz) = efe85e09021ca363df35d092b32463b359b2a23fc6e761949e944ba4209b09bdf007fc69015086a278c999411d62b9dba6fbedfb8a7c962ed40e406de45bc28e +SHA512 (nss-3.94-with-nspr-4.35.tar.gz) = 121180c80c635b0e3e9fa5d44297107d4c5da84879210e81da0f799a48e9ed1ea43e5c28d5cb53fd65218678b94b5db282b7ed0ee96482caa01493c39ed93c27 From 15cfecaf057dd1e6f9edf036c9bf8a15365a9599 Mon Sep 17 00:00:00 2001 From: Robert Relyea Date: Thu, 26 Oct 2023 08:25:32 -0700 Subject: [PATCH 18/19] Fix compatibility issue in upstream patch to use HACL ECC 256 --- nss-3.94-fix-ec-encoding.patch | 107 +++++++++++++++++++++++++++++++++ nss.spec | 9 ++- 2 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 nss-3.94-fix-ec-encoding.patch diff --git a/nss-3.94-fix-ec-encoding.patch b/nss-3.94-fix-ec-encoding.patch new file mode 100644 index 0000000..f4361c9 --- /dev/null +++ b/nss-3.94-fix-ec-encoding.patch @@ -0,0 +1,107 @@ +diff --git a/lib/freebl/blapit.h b/lib/freebl/blapit.h +--- a/lib/freebl/blapit.h ++++ b/lib/freebl/blapit.h +@@ -387,17 +387,18 @@ typedef struct DHPrivateKeyStr DHPrivate + */ + + /* + ** The ECParams data structures can encode elliptic curve + ** parameters for both GFp and GF2m curves. + */ + + typedef enum { ec_params_explicit, +- ec_params_named ++ ec_params_named, ++ ec_params_edwards_named + } ECParamsType; + + typedef enum { ec_field_GFp = 1, + ec_field_GF2m, + ec_field_plain + } ECFieldType; + + struct ECFieldIDStr { +diff --git a/lib/freebl/ecdecode.c b/lib/freebl/ecdecode.c +--- a/lib/freebl/ecdecode.c ++++ b/lib/freebl/ecdecode.c +@@ -171,16 +171,17 @@ EC_FillParams(PLArenaPool *arena, const + * (the NIST P-521 curve) + */ + CHECK_SEC_OK(gf_populate_params_bytes(ECCurve_SECG_PRIME_521R1, + ec_field_GFp, params)); + break; + + case SEC_OID_CURVE25519: + /* Populate params for Curve25519 */ ++ params->type = ec_params_edwards_named; + CHECK_SEC_OK(gf_populate_params_bytes(ECCurve25519, + ec_field_plain, + params)); + break; + + default: + break; + }; +diff --git a/lib/softoken/pkcs11.c b/lib/softoken/pkcs11.c +--- a/lib/softoken/pkcs11.c ++++ b/lib/softoken/pkcs11.c +@@ -1921,17 +1921,17 @@ sftk_GetPubKey(SFTKObject *object, CK_KE + /* special note: We can't just use the first byte to distinguish + * between EC_POINT_FORM_UNCOMPRESSED and SEC_ASN1_OCTET_STRING. + * Both are 0x04. */ + + /* Handle the non-DER encoded case. + * Some curves are always pressumed to be non-DER. + */ + if (pubKey->u.ec.publicValue.len == keyLen && +- (pubKey->u.ec.ecParams.fieldID.type == ec_field_plain || ++ (pubKey->u.ec.ecParams.type == ec_params_edwards_named || + pubKey->u.ec.publicValue.data[0] == EC_POINT_FORM_UNCOMPRESSED)) { + break; /* key was not DER encoded, no need to unwrap */ + } + + /* handle the encoded case */ + if ((pubKey->u.ec.publicValue.data[0] == SEC_ASN1_OCTET_STRING) && + pubKey->u.ec.publicValue.len > keyLen) { + SECItem publicValue; +@@ -1941,17 +1941,17 @@ sftk_GetPubKey(SFTKObject *object, CK_KE + SEC_ASN1_GET(SEC_OctetStringTemplate), + &pubKey->u.ec.publicValue); + /* nope, didn't decode correctly */ + if ((rv != SECSuccess) || (publicValue.len != keyLen)) { + crv = CKR_ATTRIBUTE_VALUE_INVALID; + break; + } + /* we don't handle compressed points except in the case of ECCurve25519 */ +- if ((pubKey->u.ec.ecParams.fieldID.type != ec_field_plain) && ++ if ((pubKey->u.ec.ecParams.type != ec_params_edwards_named) && + (publicValue.data[0] != EC_POINT_FORM_UNCOMPRESSED)) { + crv = CKR_ATTRIBUTE_VALUE_INVALID; + break; + } + /* replace our previous with the decoded key */ + pubKey->u.ec.publicValue = publicValue; + break; + } +diff --git a/lib/softoken/pkcs11c.c b/lib/softoken/pkcs11c.c +--- a/lib/softoken/pkcs11c.c ++++ b/lib/softoken/pkcs11c.c +@@ -5655,17 +5655,17 @@ NSC_GenerateKeyPair(CK_SESSION_HANDLE hS + sftk_fatalError = PR_TRUE; + } + PORT_FreeArena(ecParams->arena, PR_TRUE); + crv = sftk_MapCryptError(PORT_GetError()); + break; + } + + if (PR_GetEnvSecure("NSS_USE_DECODED_CKA_EC_POINT") || +- ecParams->fieldID.type == ec_field_plain) { ++ ecParams->type == ec_params_edwards_named) { + PORT_FreeArena(ecParams->arena, PR_TRUE); + crv = sftk_AddAttributeType(publicKey, CKA_EC_POINT, + sftk_item_expand(&ecPriv->publicValue)); + } else { + PORT_FreeArena(ecParams->arena, PR_TRUE); + SECItem *pubValue = SEC_ASN1EncodeItem(NULL, NULL, + &ecPriv->publicValue, + SEC_ASN1_GET(SEC_OctetStringTemplate)); diff --git a/nss.spec b/nss.spec index af55c38..65d1191 100644 --- a/nss.spec +++ b/nss.spec @@ -3,7 +3,7 @@ # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only -%global baserelease 1 +%global baserelease 2 %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. @@ -132,7 +132,9 @@ Patch12: nss-signtool-format.patch # fedora disabled dbm by default Patch40: nss-no-dbm-man-page.patch -Patch100: nspr-config-pc.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=1861265 +Patch50: nss-3.94-fix-ec-encoding.patch + Patch101: nspr-gcc-atomics.patch @@ -1084,6 +1086,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Oct 26 2023 Bob Relyea - 3.94.0-2 +- binary compatibility issue with HACL ECC 256 patch. + * Wed Oct 4 2023 Frantisek Krenzelok - 3.94.0-1 - Update NSS to 3.94.0 From 773479cb2497873fad9619b1342d23c965ddb810 Mon Sep 17 00:00:00 2001 From: Robert Relyea Date: Thu, 26 Oct 2023 10:40:16 -0700 Subject: [PATCH 19/19] restore patch 100 --- nss.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/nss.spec b/nss.spec index 65d1191..5ec30d3 100644 --- a/nss.spec +++ b/nss.spec @@ -135,6 +135,7 @@ Patch40: nss-no-dbm-man-page.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1861265 Patch50: nss-3.94-fix-ec-encoding.patch +Patch100: nspr-config-pc.patch Patch101: nspr-gcc-atomics.patch