From 4c542398678b5ae8eb691e32ecf95aceb7fce91f Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 13 Aug 2020 11:29:25 +0200 Subject: [PATCH 01/21] Fix DBM backend disablement Also add scriptlet to migrate old DBM databases. --- nss-disable-legacydb.patch | 14 ++++++++++++++ nss.spec | 24 +++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 nss-disable-legacydb.patch diff --git a/nss-disable-legacydb.patch b/nss-disable-legacydb.patch new file mode 100644 index 0000000..0edb9d9 --- /dev/null +++ b/nss-disable-legacydb.patch @@ -0,0 +1,14 @@ +diff -up nss/lib/softoken/Makefile.dbm nss/lib/softoken/Makefile +diff -up nss/lib/softoken/manifest.mn.dbm nss/lib/softoken/manifest.mn +--- nss/lib/softoken/manifest.mn.dbm 2020-08-13 11:03:53.511561201 +0200 ++++ nss/lib/softoken/manifest.mn 2020-08-13 11:05:17.148194158 +0200 +@@ -5,7 +5,9 @@ + CORE_DEPTH = ../.. + + MODULE = nss ++ifndef NSS_DISABLE_DBM + DIRS = legacydb ++endif + + LIBRARY_NAME = softokn + LIBRARY_VERSION = 3 diff --git a/nss.spec b/nss.spec index 1831454..0b1b9fd 100644 --- a/nss.spec +++ b/nss.spec @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 2%{?dist} +Release: 3%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -106,6 +106,10 @@ Patch2: nss-539183.patch # Once the buildroot aha been bootstrapped the patch may be removed # but it doesn't hurt to keep it. Patch4: iquote.patch +%if %{with dbm} +%else +Patch11: nss-disable-legacydb.patch +%endif Patch12: nss-signtool-format.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 @@ -631,6 +635,20 @@ install -p -m 644 %{SOURCE28} $RPM_BUILD_ROOT/%{_sysconfdir}/crypto-policies/loc # from previous versions of nss.spec /usr/bin/setup-nsssysinit.sh on +%post +%if %{with dbm} +%else +# Upon upgrade, ensure that the existing database locations are migrated to SQL +# database. +if test $1 -eq 2; then + for dbdir in %{_sysconfdir}/pki/nssdb; do + if test ! -e ${dbdir}/pkcs11.txt; then + /usr/bin/certutil --merge -d ${dbdir} --source-dir ${dbdir} + fi + done +fi +%endif + %posttrans update-crypto-policies &> /dev/null || : @@ -887,6 +905,10 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Aug 13 2020 Daiki Ueno - 3.55.0-3 +- Fix DBM backend disablement +- Add scriptlet to auto-migrated known database locations + * Sat Aug 8 2020 Daiki Ueno - 3.55.0-2 - Disable LTO From 0f162e7ae2c04654aec3b883a3a07b314ec30dbf Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 24 Aug 2020 08:48:58 +0200 Subject: [PATCH 02/21] Update to NSS 3.56 --- .gitignore | 1 + nss.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c2961be..c2bccb3 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ TestUser51.cert /nss-3.53.tar.gz /nss-3.54.tar.gz /nss-3.55.tar.gz +/nss-3.56.tar.gz diff --git a/nss.spec b/nss.spec index 0b1b9fd..0f10ab8 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ -%global nspr_version 4.26.0 -%global nss_version 3.55.0 +%global nspr_version 4.28.0 +%global nss_version 3.56.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 3%{?dist} +Release: 1%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -905,6 +905,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Mon Aug 24 2020 Daiki Ueno - 3.56.0-1 +- Update to NSS 3.56 + * Thu Aug 13 2020 Daiki Ueno - 3.55.0-3 - Fix DBM backend disablement - Add scriptlet to auto-migrated known database locations diff --git a/sources b/sources index 040d300..21a0798 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.55.tar.gz) = acae7b803a3219cd4b78216cb8a6352805741e42eca6a42a5e6289ebbabc6189c7c6bc138cbd8a93d8631d06175c4d34e72957d49fe726adada6aaa2566e399e +SHA512 (nss-3.56.tar.gz) = f2eed8252c13b38a4d80a11203136d22a521205f814b6d954cc119ccf8921fcb8f689d919944bea4739d1575e9bda7e13cf2ad054ac91d51e049abe246efc845 From 2b09df37b83c584e4bdf72e733b125dbf5a9775a Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sat, 5 Sep 2020 10:46:10 +0200 Subject: [PATCH 03/21] Fix AArch64 build failure --- nss-aarch64-gcc.patch | 58 +++++++++++++++++++++++++++++++++++++++++++ nss.spec | 4 +++ 2 files changed, 62 insertions(+) create mode 100644 nss-aarch64-gcc.patch diff --git a/nss-aarch64-gcc.patch b/nss-aarch64-gcc.patch new file mode 100644 index 0000000..fa3b812 --- /dev/null +++ b/nss-aarch64-gcc.patch @@ -0,0 +1,58 @@ +# HG changeset patch +# User Daiki Ueno +# Date 1599294537 -7200 +# Sat Sep 05 10:28:57 2020 +0200 +# Node ID 1294add76fecdfc301c9cab3ed68ed1681979780 +# Parent e03296e73ba666329bd9c1257038353bc9074466 +Bug 1659256, add gcc version check on AArch64 optimization, r?rrelyea + +Reviewers: rrelyea + +Bug #: 1659256 + +Differential Revision: https://phabricator.services.mozilla.com/D87174 + +diff -r e03296e73ba6 -r 1294add76fec lib/freebl/Makefile +--- a/lib/freebl/Makefile Sat Sep 05 08:53:40 2020 +0200 ++++ b/lib/freebl/Makefile Sat Sep 05 10:28:57 2020 +0200 +@@ -119,11 +119,24 @@ + DEFINES += -DNSS_X86 + endif + endif +-ifdef NS_USE_GCC + ifeq ($(CPU_ARCH),aarch64) +- DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 +- EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c +-endif ++ ifdef CC_IS_CLANG ++ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 ++ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c ++ else ifeq (1,$(CC_IS_GCC)) ++ # GCC versions older than 4.9 don't support ARM AES. The check ++ # is done in two parts, first allows "major.minor" == "4.9", ++ # and then rejects any major versions prior to 5. Note that ++ # there has been no GCC 4.10, as it is renamed to GCC 5. ++ ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION)))) ++ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 ++ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c ++ endif ++ ifeq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION)))) ++ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 ++ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c ++ endif ++ endif + endif + ifeq ($(CPU_ARCH),arm) + ifndef NSS_DISABLE_ARM32_NEON +@@ -133,7 +146,10 @@ + DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 + EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c + else ifeq (1,$(CC_IS_GCC)) +- # Old compiler doesn't support ARM AES. ++ # GCC versions older than 4.9 don't support ARM AES. The check ++ # is done in two parts, first allows "major.minor" == "4.9", ++ # and then rejects any major versions prior to 5. Note that ++ # there has been no GCC 4.10, as it is renamed to GCC 5. + ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION)))) + DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 + EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c diff --git a/nss.spec b/nss.spec index 0f10ab8..a68efdb 100644 --- a/nss.spec +++ b/nss.spec @@ -111,6 +111,10 @@ Patch4: iquote.patch Patch11: nss-disable-legacydb.patch %endif Patch12: nss-signtool-format.patch +# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1659256 +# Also fixes the regression in bug 1652032: +# https://phabricator.services.mozilla.com/D87174#2817994 +Patch13: nss-aarch64-gcc.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 Patch20: nss-gcm-param-default-pkcs11v2.patch From b0b69b35c2ec00da523cb07d72aecdeb9f3382ca Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sat, 5 Sep 2020 11:08:21 +0200 Subject: [PATCH 04/21] Update the AArch64 patch --- nss-aarch64-gcc.patch | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/nss-aarch64-gcc.patch b/nss-aarch64-gcc.patch index fa3b812..ad3533f 100644 --- a/nss-aarch64-gcc.patch +++ b/nss-aarch64-gcc.patch @@ -2,7 +2,7 @@ # User Daiki Ueno # Date 1599294537 -7200 # Sat Sep 05 10:28:57 2020 +0200 -# Node ID 1294add76fecdfc301c9cab3ed68ed1681979780 +# Node ID c2a28193fcf8771dc1f739bf5f41adf3f68b1d7d # Parent e03296e73ba666329bd9c1257038353bc9074466 Bug 1659256, add gcc version check on AArch64 optimization, r?rrelyea @@ -12,7 +12,7 @@ Bug #: 1659256 Differential Revision: https://phabricator.services.mozilla.com/D87174 -diff -r e03296e73ba6 -r 1294add76fec lib/freebl/Makefile +diff -r e03296e73ba6 -r c2a28193fcf8 lib/freebl/Makefile --- a/lib/freebl/Makefile Sat Sep 05 08:53:40 2020 +0200 +++ b/lib/freebl/Makefile Sat Sep 05 10:28:57 2020 +0200 @@ -119,11 +119,24 @@ @@ -56,3 +56,18 @@ diff -r e03296e73ba6 -r 1294add76fec lib/freebl/Makefile ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION)))) DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c +@@ -728,14 +744,12 @@ + endif + endif + +-ifdef NS_USE_GCC + ifeq ($(CPU_ARCH),aarch64) + $(OBJDIR)/$(PROG_PREFIX)aes-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto + $(OBJDIR)/$(PROG_PREFIX)gcm-aarch64$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto + $(OBJDIR)/$(PROG_PREFIX)sha1-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto + $(OBJDIR)/$(PROG_PREFIX)sha256-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto + endif +-endif + + ifeq ($(CPU_ARCH),ppc) + ifndef NSS_DISABLE_ALTIVEC From 425faa5ecc012ed5fd0640b29b8ae57087416f14 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sat, 19 Sep 2020 09:13:11 +0200 Subject: [PATCH 05/21] Update to NSS 3.57 --- .gitignore | 1 + nss-3.53-strict-proto-fix.patch | 12 ------ nss-aarch64-gcc.patch | 73 --------------------------------- nss.spec | 11 +++-- sources | 2 +- 5 files changed, 7 insertions(+), 92 deletions(-) delete mode 100644 nss-3.53-strict-proto-fix.patch delete mode 100644 nss-aarch64-gcc.patch diff --git a/.gitignore b/.gitignore index c2bccb3..63d66bc 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ TestUser51.cert /nss-3.54.tar.gz /nss-3.55.tar.gz /nss-3.56.tar.gz +/nss-3.57.tar.gz diff --git a/nss-3.53-strict-proto-fix.patch b/nss-3.53-strict-proto-fix.patch deleted file mode 100644 index e69c977..0000000 --- a/nss-3.53-strict-proto-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ./lib/pk11wrap/pk11pub.h.strict_proto_fix ./lib/pk11wrap/pk11pub.h ---- ./lib/pk11wrap/pk11pub.h.strict_proto_fix 2020-06-04 16:48:54.721954514 -0700 -+++ ./lib/pk11wrap/pk11pub.h 2020-06-04 16:49:17.074066050 -0700 -@@ -948,7 +948,7 @@ PRBool SECMOD_HasRootCerts(void); - * the system state independent of the database state and can be called - * before NSS initializes. - */ --int SECMOD_GetSystemFIPSEnabled(); -+int SECMOD_GetSystemFIPSEnabled(void); - - SEC_END_PROTOS - diff --git a/nss-aarch64-gcc.patch b/nss-aarch64-gcc.patch deleted file mode 100644 index ad3533f..0000000 --- a/nss-aarch64-gcc.patch +++ /dev/null @@ -1,73 +0,0 @@ -# HG changeset patch -# User Daiki Ueno -# Date 1599294537 -7200 -# Sat Sep 05 10:28:57 2020 +0200 -# Node ID c2a28193fcf8771dc1f739bf5f41adf3f68b1d7d -# Parent e03296e73ba666329bd9c1257038353bc9074466 -Bug 1659256, add gcc version check on AArch64 optimization, r?rrelyea - -Reviewers: rrelyea - -Bug #: 1659256 - -Differential Revision: https://phabricator.services.mozilla.com/D87174 - -diff -r e03296e73ba6 -r c2a28193fcf8 lib/freebl/Makefile ---- a/lib/freebl/Makefile Sat Sep 05 08:53:40 2020 +0200 -+++ b/lib/freebl/Makefile Sat Sep 05 10:28:57 2020 +0200 -@@ -119,11 +119,24 @@ - DEFINES += -DNSS_X86 - endif - endif --ifdef NS_USE_GCC - ifeq ($(CPU_ARCH),aarch64) -- DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 -- EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c --endif -+ ifdef CC_IS_CLANG -+ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 -+ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c -+ else ifeq (1,$(CC_IS_GCC)) -+ # GCC versions older than 4.9 don't support ARM AES. The check -+ # is done in two parts, first allows "major.minor" == "4.9", -+ # and then rejects any major versions prior to 5. Note that -+ # there has been no GCC 4.10, as it is renamed to GCC 5. -+ ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION)))) -+ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 -+ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c -+ endif -+ ifeq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION)))) -+ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 -+ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c -+ endif -+ endif - endif - ifeq ($(CPU_ARCH),arm) - ifndef NSS_DISABLE_ARM32_NEON -@@ -133,7 +146,10 @@ - DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 - EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c - else ifeq (1,$(CC_IS_GCC)) -- # Old compiler doesn't support ARM AES. -+ # GCC versions older than 4.9 don't support ARM AES. The check -+ # is done in two parts, first allows "major.minor" == "4.9", -+ # and then rejects any major versions prior to 5. Note that -+ # there has been no GCC 4.10, as it is renamed to GCC 5. - ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION)))) - DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2 - EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c -@@ -728,14 +744,12 @@ - endif - endif - --ifdef NS_USE_GCC - ifeq ($(CPU_ARCH),aarch64) - $(OBJDIR)/$(PROG_PREFIX)aes-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto - $(OBJDIR)/$(PROG_PREFIX)gcm-aarch64$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto - $(OBJDIR)/$(PROG_PREFIX)sha1-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto - $(OBJDIR)/$(PROG_PREFIX)sha256-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto - endif --endif - - ifeq ($(CPU_ARCH),ppc) - ifndef NSS_DISABLE_ALTIVEC diff --git a/nss.spec b/nss.spec index a68efdb..7453cc8 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ -%global nspr_version 4.28.0 -%global nss_version 3.56.0 +%global nspr_version 4.29.0 +%global nss_version 3.57.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -111,10 +111,6 @@ Patch4: iquote.patch Patch11: nss-disable-legacydb.patch %endif Patch12: nss-signtool-format.patch -# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1659256 -# Also fixes the regression in bug 1652032: -# https://phabricator.services.mozilla.com/D87174#2817994 -Patch13: nss-aarch64-gcc.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 Patch20: nss-gcm-param-default-pkcs11v2.patch @@ -909,6 +905,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Sat Sep 19 2020 Daiki Ueno - 3.57.0-1 +- Update to NSS 3.57 + * Mon Aug 24 2020 Daiki Ueno - 3.56.0-1 - Update to NSS 3.56 diff --git a/sources b/sources index 21a0798..3ddbfe7 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.56.tar.gz) = f2eed8252c13b38a4d80a11203136d22a521205f814b6d954cc119ccf8921fcb8f689d919944bea4739d1575e9bda7e13cf2ad054ac91d51e049abe246efc845 +SHA512 (nss-3.57.tar.gz) = 7e312d7539a26f57b968548935a7715cfa895aa61da21d0542ae45b71cb16f63167728534cdfd15f8eca68c75753a0df3d05e87b4c5acaabbda63c736e552ea2 From 29f717731aeb2e8dc061eacf36bd5fe2e1a4f687 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 20 Sep 2020 16:01:11 +0200 Subject: [PATCH 06/21] Remove upstreamed patch --- nss-disable-legacydb.patch | 14 -------------- nss.spec | 4 ---- 2 files changed, 18 deletions(-) delete mode 100644 nss-disable-legacydb.patch diff --git a/nss-disable-legacydb.patch b/nss-disable-legacydb.patch deleted file mode 100644 index 0edb9d9..0000000 --- a/nss-disable-legacydb.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up nss/lib/softoken/Makefile.dbm nss/lib/softoken/Makefile -diff -up nss/lib/softoken/manifest.mn.dbm nss/lib/softoken/manifest.mn ---- nss/lib/softoken/manifest.mn.dbm 2020-08-13 11:03:53.511561201 +0200 -+++ nss/lib/softoken/manifest.mn 2020-08-13 11:05:17.148194158 +0200 -@@ -5,7 +5,9 @@ - CORE_DEPTH = ../.. - - MODULE = nss -+ifndef NSS_DISABLE_DBM - DIRS = legacydb -+endif - - LIBRARY_NAME = softokn - LIBRARY_VERSION = 3 diff --git a/nss.spec b/nss.spec index 7453cc8..92e658f 100644 --- a/nss.spec +++ b/nss.spec @@ -106,10 +106,6 @@ Patch2: nss-539183.patch # Once the buildroot aha been bootstrapped the patch may be removed # but it doesn't hurt to keep it. Patch4: iquote.patch -%if %{with dbm} -%else -Patch11: nss-disable-legacydb.patch -%endif Patch12: nss-signtool-format.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 From 10e6d162411ea40529c6f0960ad59bf6a98de9cf Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 20 Oct 2020 09:31:29 +0200 Subject: [PATCH 07/21] Update to NSS 3.58 --- .gitignore | 1 + nss.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 63d66bc..38fb549 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ TestUser51.cert /nss-3.55.tar.gz /nss-3.56.tar.gz /nss-3.57.tar.gz +/nss-3.58.tar.gz diff --git a/nss.spec b/nss.spec index 92e658f..1d46a53 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.29.0 -%global nss_version 3.57.0 +%global nss_version 3.58.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -901,6 +901,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Oct 20 2020 Daiki Ueno - 3.58.0-1 +- Update to NSS 3.58 + * Sat Sep 19 2020 Daiki Ueno - 3.57.0-1 - Update to NSS 3.57 diff --git a/sources b/sources index 3ddbfe7..d5ad023 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.57.tar.gz) = 7e312d7539a26f57b968548935a7715cfa895aa61da21d0542ae45b71cb16f63167728534cdfd15f8eca68c75753a0df3d05e87b4c5acaabbda63c736e552ea2 +SHA512 (nss-3.58.tar.gz) = 03d2ab1517ac07620ea3f02dcf680cf019e0129006ff2559b2d0a047036340c20b98c9679b17a594e5502aa30e158caf309f046901b9ec7c7adeeaa13ec50b80 From 75733eef32f9468498e8d922f4a210def52c3102 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 20 Oct 2020 11:12:33 +0200 Subject: [PATCH 08/21] Install pk11hpke.h --- nss.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/nss.spec b/nss.spec index 1d46a53..198944b 100644 --- a/nss.spec +++ b/nss.spec @@ -755,6 +755,7 @@ update-crypto-policies &> /dev/null || : %{_includedir}/nss3/p12plcy.h %{_includedir}/nss3/p12t.h %{_includedir}/nss3/pk11func.h +%{_includedir}/nss3/pk11hpke.h %{_includedir}/nss3/pk11pqg.h %{_includedir}/nss3/pk11priv.h %{_includedir}/nss3/pk11pub.h From 127b34cee4d3f5dc59c4e1f4d55716efa993d9d6 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 22 Oct 2020 17:06:28 +0200 Subject: [PATCH 09/21] Enable TLS 1.3 middlebox compatibility mode by default --- nss-ccs.patch | 13 +++++++++++++ nss.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 nss-ccs.patch diff --git a/nss-ccs.patch b/nss-ccs.patch new file mode 100644 index 0000000..8a258f4 --- /dev/null +++ b/nss-ccs.patch @@ -0,0 +1,13 @@ +Index: nss/lib/ssl/sslsock.c +=================================================================== +--- nss.orig/lib/ssl/sslsock.c ++++ nss/lib/ssl/sslsock.c +@@ -86,7 +86,7 @@ static sslOptions ssl_defaults = { + .enableSignedCertTimestamps = PR_FALSE, + .requireDHENamedGroups = PR_FALSE, + .enable0RttData = PR_FALSE, +- .enableTls13CompatMode = PR_FALSE, ++ .enableTls13CompatMode = PR_TRUE, + .enableDtls13VersionCompat = PR_FALSE, + .enableDtlsShortHeader = PR_FALSE, + .enableHelloDowngradeCheck = PR_FALSE, diff --git a/nss.spec b/nss.spec index 198944b..3b11c63 100644 --- a/nss.spec +++ b/nss.spec @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 1%{?dist} +Release: 2%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -106,6 +106,8 @@ Patch2: nss-539183.patch # Once the buildroot aha been bootstrapped the patch may be removed # but it doesn't hurt to keep it. Patch4: iquote.patch +# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1672703 +Patch5: nss-ccs.patch Patch12: nss-signtool-format.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 @@ -902,6 +904,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Oct 22 2020 Daiki Ueno - 3.58.0-2 +- Enable TLS 1.3 middlebox compatibility mode by default + * Tue Oct 20 2020 Daiki Ueno - 3.58.0-1 - Update to NSS 3.58 From 97a26627f0bf520e2dc11c2c1dba3d6d586dd80d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 26 Oct 2020 06:55:42 +0100 Subject: [PATCH 10/21] Revert the last change, tolerate the first CCS in TLS 1.3 --- nss-ccs.patch | 145 +++++++++++++++++++++++++++++++++++++++++++++----- nss.spec | 5 +- 2 files changed, 136 insertions(+), 14 deletions(-) diff --git a/nss-ccs.patch b/nss-ccs.patch index 8a258f4..4841a5a 100644 --- a/nss-ccs.patch +++ b/nss-ccs.patch @@ -1,13 +1,132 @@ -Index: nss/lib/ssl/sslsock.c -=================================================================== ---- nss.orig/lib/ssl/sslsock.c -+++ nss/lib/ssl/sslsock.c -@@ -86,7 +86,7 @@ static sslOptions ssl_defaults = { - .enableSignedCertTimestamps = PR_FALSE, - .requireDHENamedGroups = PR_FALSE, - .enable0RttData = PR_FALSE, -- .enableTls13CompatMode = PR_FALSE, -+ .enableTls13CompatMode = PR_TRUE, - .enableDtls13VersionCompat = PR_FALSE, - .enableDtlsShortHeader = PR_FALSE, - .enableHelloDowngradeCheck = PR_FALSE, +# HG changeset patch +# User Daiki Ueno +# Date 1603691171 -3600 +# Mon Oct 26 06:46:11 2020 +0100 +# Node ID b03a4fc5b902498414b02640dcb2717dfef9682f +# Parent 6f79a76958129dc09c353c288f115fd9a51ab7d4 +Bug 1672703, always tolerate the first CCS in TLS 1.3, r=mt + +Summary: +This flips the meaning of the flag for checking excessive CCS +messages, so it only rejects multiple CCS messages while the first CCS +message is always accepted. + +Reviewers: mt + +Reviewed By: mt + +Bug #: 1672703 + +Differential Revision: https://phabricator.services.mozilla.com/D94603 + +diff -r 6f79a7695812 -r b03a4fc5b902 gtests/ssl_gtest/ssl_tls13compat_unittest.cc +--- a/gtests/ssl_gtest/ssl_tls13compat_unittest.cc Fri Oct 23 16:14:36 2020 -0700 ++++ b/gtests/ssl_gtest/ssl_tls13compat_unittest.cc Mon Oct 26 06:46:11 2020 +0100 +@@ -348,8 +348,8 @@ + client_->CheckErrorCode(SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT); + } + +-// The server rejects a ChangeCipherSpec if the client advertises an +-// empty session ID. ++// The server accepts a ChangeCipherSpec even if the client advertises ++// an empty session ID. + TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterClientHelloEmptySid) { + EnsureTlsSetup(); + ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3); +@@ -358,9 +358,8 @@ + client_->Handshake(); // Send ClientHello + client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); // Send CCS + +- server_->ExpectSendAlert(kTlsAlertUnexpectedMessage); +- server_->Handshake(); // Consume ClientHello and CCS +- server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); ++ Handshake(); ++ CheckConnected(); + } + + // The server rejects multiple ChangeCipherSpec even if the client +@@ -381,7 +380,7 @@ + server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); + } + +-// The client rejects a ChangeCipherSpec if it advertises an empty ++// The client accepts a ChangeCipherSpec even if it advertises an empty + // session ID. + TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterServerHelloEmptySid) { + EnsureTlsSetup(); +@@ -398,9 +397,10 @@ + // send ServerHello..CertificateVerify + // Send CCS + server_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); +- client_->ExpectSendAlert(kTlsAlertUnexpectedMessage); +- client_->Handshake(); // Consume ClientHello and CCS +- client_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); ++ ++ // No alert is sent from the client. As Finished is dropped, we ++ // can't use Handshake() and CheckConnected(). ++ client_->Handshake(); + } + + // The client rejects multiple ChangeCipherSpec in a row even if the +diff -r 6f79a7695812 -r b03a4fc5b902 lib/ssl/ssl3con.c +--- a/lib/ssl/ssl3con.c Fri Oct 23 16:14:36 2020 -0700 ++++ b/lib/ssl/ssl3con.c Mon Oct 26 06:46:11 2020 +0100 +@@ -6645,11 +6645,7 @@ + + /* TLS 1.3: We sent a session ID. The server's should match. */ + if (!IS_DTLS(ss) && (sentRealSid || sentFakeSid)) { +- if (sidMatch) { +- ss->ssl3.hs.allowCcs = PR_TRUE; +- return PR_TRUE; +- } +- return PR_FALSE; ++ return sidMatch; + } + + /* TLS 1.3 (no SID)/DTLS 1.3: The server shouldn't send a session ID. */ +@@ -8696,7 +8692,6 @@ + errCode = PORT_GetError(); + goto alert_loser; + } +- ss->ssl3.hs.allowCcs = PR_TRUE; + } + + /* TLS 1.3 requires that compression include only null. */ +@@ -13066,15 +13061,14 @@ + ss->ssl3.hs.ws != idle_handshake && + cText->buf->len == 1 && + cText->buf->buf[0] == change_cipher_spec_choice) { +- if (ss->ssl3.hs.allowCcs) { +- /* Ignore the first CCS. */ +- ss->ssl3.hs.allowCcs = PR_FALSE; ++ if (!ss->ssl3.hs.rejectCcs) { ++ /* Allow only the first CCS. */ ++ ss->ssl3.hs.rejectCcs = PR_TRUE; + return SECSuccess; +- } +- +- /* Compatibility mode is not negotiated. */ +- alert = unexpected_message; +- PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); ++ } else { ++ alert = unexpected_message; ++ PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); ++ } + } + + if ((IS_DTLS(ss) && !dtls13_AeadLimitReached(spec)) || +diff -r 6f79a7695812 -r b03a4fc5b902 lib/ssl/sslimpl.h +--- a/lib/ssl/sslimpl.h Fri Oct 23 16:14:36 2020 -0700 ++++ b/lib/ssl/sslimpl.h Mon Oct 26 06:46:11 2020 +0100 +@@ -710,10 +710,7 @@ + * or received. */ + PRBool receivedCcs; /* A server received ChangeCipherSpec + * before the handshake started. */ +- PRBool allowCcs; /* A server allows ChangeCipherSpec +- * as the middlebox compatibility mode +- * is explicitly indicarted by +- * legacy_session_id in TLS 1.3 ClientHello. */ ++ PRBool rejectCcs; /* Excessive ChangeCipherSpecs are rejected. */ + PRBool clientCertRequested; /* True if CertificateRequest received. */ + PRBool endOfFlight; /* Processed a full flight (DTLS 1.3). */ + ssl3KEADef kea_def_mutable; /* Used to hold the writable kea_def diff --git a/nss.spec b/nss.spec index 3b11c63..cb2e818 100644 --- a/nss.spec +++ b/nss.spec @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 2%{?dist} +Release: 3%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -904,6 +904,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Mon Oct 26 2020 Daiki Ueno - 3.58.0-3 +- Revert the last change, always tolerate the first CCS in TLS 1.3 + * Thu Oct 22 2020 Daiki Ueno - 3.58.0-2 - Enable TLS 1.3 middlebox compatibility mode by default From ba08eea9a6d314ffc4bd5169a544016d9215371e Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 11 Dec 2020 11:27:37 +0100 Subject: [PATCH 11/21] Update to NSS 3.59 --- .gitignore | 1 + nss-ccs.patch | 132 -------------------------------------------------- nss.spec | 9 ++-- sources | 2 +- 4 files changed, 7 insertions(+), 137 deletions(-) delete mode 100644 nss-ccs.patch diff --git a/.gitignore b/.gitignore index 38fb549..cf54e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ TestUser51.cert /nss-3.56.tar.gz /nss-3.57.tar.gz /nss-3.58.tar.gz +/nss-3.59.tar.gz diff --git a/nss-ccs.patch b/nss-ccs.patch deleted file mode 100644 index 4841a5a..0000000 --- a/nss-ccs.patch +++ /dev/null @@ -1,132 +0,0 @@ -# HG changeset patch -# User Daiki Ueno -# Date 1603691171 -3600 -# Mon Oct 26 06:46:11 2020 +0100 -# Node ID b03a4fc5b902498414b02640dcb2717dfef9682f -# Parent 6f79a76958129dc09c353c288f115fd9a51ab7d4 -Bug 1672703, always tolerate the first CCS in TLS 1.3, r=mt - -Summary: -This flips the meaning of the flag for checking excessive CCS -messages, so it only rejects multiple CCS messages while the first CCS -message is always accepted. - -Reviewers: mt - -Reviewed By: mt - -Bug #: 1672703 - -Differential Revision: https://phabricator.services.mozilla.com/D94603 - -diff -r 6f79a7695812 -r b03a4fc5b902 gtests/ssl_gtest/ssl_tls13compat_unittest.cc ---- a/gtests/ssl_gtest/ssl_tls13compat_unittest.cc Fri Oct 23 16:14:36 2020 -0700 -+++ b/gtests/ssl_gtest/ssl_tls13compat_unittest.cc Mon Oct 26 06:46:11 2020 +0100 -@@ -348,8 +348,8 @@ - client_->CheckErrorCode(SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT); - } - --// The server rejects a ChangeCipherSpec if the client advertises an --// empty session ID. -+// The server accepts a ChangeCipherSpec even if the client advertises -+// an empty session ID. - TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterClientHelloEmptySid) { - EnsureTlsSetup(); - ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3); -@@ -358,9 +358,8 @@ - client_->Handshake(); // Send ClientHello - client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); // Send CCS - -- server_->ExpectSendAlert(kTlsAlertUnexpectedMessage); -- server_->Handshake(); // Consume ClientHello and CCS -- server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); -+ Handshake(); -+ CheckConnected(); - } - - // The server rejects multiple ChangeCipherSpec even if the client -@@ -381,7 +380,7 @@ - server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); - } - --// The client rejects a ChangeCipherSpec if it advertises an empty -+// The client accepts a ChangeCipherSpec even if it advertises an empty - // session ID. - TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterServerHelloEmptySid) { - EnsureTlsSetup(); -@@ -398,9 +397,10 @@ - // send ServerHello..CertificateVerify - // Send CCS - server_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); -- client_->ExpectSendAlert(kTlsAlertUnexpectedMessage); -- client_->Handshake(); // Consume ClientHello and CCS -- client_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); -+ -+ // No alert is sent from the client. As Finished is dropped, we -+ // can't use Handshake() and CheckConnected(). -+ client_->Handshake(); - } - - // The client rejects multiple ChangeCipherSpec in a row even if the -diff -r 6f79a7695812 -r b03a4fc5b902 lib/ssl/ssl3con.c ---- a/lib/ssl/ssl3con.c Fri Oct 23 16:14:36 2020 -0700 -+++ b/lib/ssl/ssl3con.c Mon Oct 26 06:46:11 2020 +0100 -@@ -6645,11 +6645,7 @@ - - /* TLS 1.3: We sent a session ID. The server's should match. */ - if (!IS_DTLS(ss) && (sentRealSid || sentFakeSid)) { -- if (sidMatch) { -- ss->ssl3.hs.allowCcs = PR_TRUE; -- return PR_TRUE; -- } -- return PR_FALSE; -+ return sidMatch; - } - - /* TLS 1.3 (no SID)/DTLS 1.3: The server shouldn't send a session ID. */ -@@ -8696,7 +8692,6 @@ - errCode = PORT_GetError(); - goto alert_loser; - } -- ss->ssl3.hs.allowCcs = PR_TRUE; - } - - /* TLS 1.3 requires that compression include only null. */ -@@ -13066,15 +13061,14 @@ - ss->ssl3.hs.ws != idle_handshake && - cText->buf->len == 1 && - cText->buf->buf[0] == change_cipher_spec_choice) { -- if (ss->ssl3.hs.allowCcs) { -- /* Ignore the first CCS. */ -- ss->ssl3.hs.allowCcs = PR_FALSE; -+ if (!ss->ssl3.hs.rejectCcs) { -+ /* Allow only the first CCS. */ -+ ss->ssl3.hs.rejectCcs = PR_TRUE; - return SECSuccess; -- } -- -- /* Compatibility mode is not negotiated. */ -- alert = unexpected_message; -- PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); -+ } else { -+ alert = unexpected_message; -+ PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER); -+ } - } - - if ((IS_DTLS(ss) && !dtls13_AeadLimitReached(spec)) || -diff -r 6f79a7695812 -r b03a4fc5b902 lib/ssl/sslimpl.h ---- a/lib/ssl/sslimpl.h Fri Oct 23 16:14:36 2020 -0700 -+++ b/lib/ssl/sslimpl.h Mon Oct 26 06:46:11 2020 +0100 -@@ -710,10 +710,7 @@ - * or received. */ - PRBool receivedCcs; /* A server received ChangeCipherSpec - * before the handshake started. */ -- PRBool allowCcs; /* A server allows ChangeCipherSpec -- * as the middlebox compatibility mode -- * is explicitly indicarted by -- * legacy_session_id in TLS 1.3 ClientHello. */ -+ PRBool rejectCcs; /* Excessive ChangeCipherSpecs are rejected. */ - PRBool clientCertRequested; /* True if CertificateRequest received. */ - PRBool endOfFlight; /* Processed a full flight (DTLS 1.3). */ - ssl3KEADef kea_def_mutable; /* Used to hold the writable kea_def diff --git a/nss.spec b/nss.spec index cb2e818..341fdfd 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.29.0 -%global nss_version 3.58.0 +%global nss_version 3.59.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 3%{?dist} +Release: 1%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -106,8 +106,6 @@ Patch2: nss-539183.patch # Once the buildroot aha been bootstrapped the patch may be removed # but it doesn't hurt to keep it. Patch4: iquote.patch -# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1672703 -Patch5: nss-ccs.patch Patch12: nss-signtool-format.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 @@ -904,6 +902,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Fri Dec 11 2020 Daiki Ueno - 3.59.0-1 +- Update to NSS 3.59 + * Mon Oct 26 2020 Daiki Ueno - 3.58.0-3 - Revert the last change, always tolerate the first CCS in TLS 1.3 diff --git a/sources b/sources index d5ad023..da88737 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.58.tar.gz) = 03d2ab1517ac07620ea3f02dcf680cf019e0129006ff2559b2d0a047036340c20b98c9679b17a594e5502aa30e158caf309f046901b9ec7c7adeeaa13ec50b80 +SHA512 (nss-3.59.tar.gz) = 8963e846f2ff7222457ae59f042672cf4e44f7752807226f46c215a772fd1cbd65d0ce634da4afb698eabd4eb1c1e78146cc2a089339ada11da03d259c609a38 From a4039ab8d2a3c92ec4843ed4b9641b07bd24cc42 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Sat, 12 Dec 2020 10:24:46 -0800 Subject: [PATCH 12/21] - Work around btrfs/sqlite bug - Disable new policy entries until crypto-polices has been updated --- ....1-revert_rhel8_unsafe_policy_change.patch | 39 +++++++++++++++++++ nss-fedora-btrf-sql-hack.patch | 18 +++++++++ nss.spec | 10 ++++- 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 nss-3.53.1-revert_rhel8_unsafe_policy_change.patch create mode 100644 nss-fedora-btrf-sql-hack.patch diff --git a/nss-3.53.1-revert_rhel8_unsafe_policy_change.patch b/nss-3.53.1-revert_rhel8_unsafe_policy_change.patch new file mode 100644 index 0000000..9e39df7 --- /dev/null +++ b/nss-3.53.1-revert_rhel8_unsafe_policy_change.patch @@ -0,0 +1,39 @@ +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-fedora-btrf-sql-hack.patch b/nss-fedora-btrf-sql-hack.patch new file mode 100644 index 0000000..db60cc2 --- /dev/null +++ b/nss-fedora-btrf-sql-hack.patch @@ -0,0 +1,18 @@ +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.spec b/nss.spec index 341fdfd..0e3133a 100644 --- a/nss.spec +++ b/nss.spec @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 1%{?dist} +Release: 2%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -112,6 +112,10 @@ Patch12: nss-signtool-format.patch Patch20: nss-gcm-param-default-pkcs11v2.patch %endif %endif +# can drop this patch when the underlying btrfs/sqlite issue is solved +Patch30: nss-fedora-btrf-sql-hack.patch +# can drop this patch once crypto-policies has been updated +Patch31: nss-3.53.1-revert_rhel8_unsafe_policy_change.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -902,6 +906,10 @@ update-crypto-policies &> /dev/null || : %changelog +* Fri Dec 11 2020 Bob Relyea - 3.59.0-2 +- Work around btrfs/sqlite bug +- Disable new policy entries until crypto-polices has been updated + * Fri Dec 11 2020 Daiki Ueno - 3.59.0-1 - Update to NSS 3.59 From 0d67947dcfdb89ec9602d5b715f7221a02d10eb0 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Tue, 15 Dec 2020 20:25:48 -0800 Subject: [PATCH 13/21] - Back out strict SHA-1 signature control because firefox Addon system is still using sha-1 signatures --- nss-fedora-relax-sha1.patch | 22 ++++++++++++++++++++++ nss.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 nss-fedora-relax-sha1.patch diff --git a/nss-fedora-relax-sha1.patch b/nss-fedora-relax-sha1.patch new file mode 100644 index 0000000..5c2f5bb --- /dev/null +++ b/nss-fedora-relax-sha1.patch @@ -0,0 +1,22 @@ +diff --git a/lib/pk11wrap/pk11pars.c b/lib/pk11wrap/pk11pars.c +--- a/lib/pk11wrap/pk11pars.c ++++ b/lib/pk11wrap/pk11pars.c +@@ -325,17 +325,17 @@ static const oidValDef hashOptList[] = { + /* Hashes */ + { CIPHER_NAME("MD2"), SEC_OID_MD2, + NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, + { CIPHER_NAME("MD4"), SEC_OID_MD4, + NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, + { CIPHER_NAME("MD5"), SEC_OID_MD5, + NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, + { CIPHER_NAME("SHA1"), SEC_OID_SHA1, +- NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, ++ NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_CERT_SIGNATURE }, + { CIPHER_NAME("SHA224"), SEC_OID_SHA224, + NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, + { CIPHER_NAME("SHA256"), SEC_OID_SHA256, + NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, + { CIPHER_NAME("SHA384"), SEC_OID_SHA384, + NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE }, + { CIPHER_NAME("SHA512"), SEC_OID_SHA512, + NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE } diff --git a/nss.spec b/nss.spec index 0e3133a..90afceb 100644 --- a/nss.spec +++ b/nss.spec @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 2%{?dist} +Release: 3%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -116,6 +116,7 @@ Patch20: nss-gcm-param-default-pkcs11v2.patch Patch30: nss-fedora-btrf-sql-hack.patch # can drop this patch once crypto-policies has been updated Patch31: nss-3.53.1-revert_rhel8_unsafe_policy_change.patch +Patch33: nss-fedora-relax-sha1.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -906,6 +907,10 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Dec 15 2020 Bob Relyea - 3.59.0-3 +- Back out strict SHA-1 signature control because firefox + Addon system is still using sha-1 signatures + * Fri Dec 11 2020 Bob Relyea - 3.59.0-2 - Work around btrfs/sqlite bug - Disable new policy entries until crypto-polices has been updated From 0af1776a67ba12c1c0f0f82d922672f890970ba7 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Fri, 22 Jan 2021 16:45:23 +0000 Subject: [PATCH 14/21] Update to NSS 3.60.1 --- .gitignore | 1 + nss-turn-off-expired-ocsp-cert.patch | 19 +++++++++++++++++++ nss.spec | 8 ++++++-- sources | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 nss-turn-off-expired-ocsp-cert.patch diff --git a/.gitignore b/.gitignore index cf54e0d..d08b965 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ TestUser51.cert /nss-3.57.tar.gz /nss-3.58.tar.gz /nss-3.59.tar.gz +/nss-3.60.1.tar.gz diff --git a/nss-turn-off-expired-ocsp-cert.patch b/nss-turn-off-expired-ocsp-cert.patch new file mode 100644 index 0000000..dfbbb50 --- /dev/null +++ b/nss-turn-off-expired-ocsp-cert.patch @@ -0,0 +1,19 @@ +diff --git a/tests/chains/scenarios/nameconstraints.cfg b/tests/chains/scenarios/nameconstraints.cfg +--- a/tests/chains/scenarios/nameconstraints.cfg ++++ b/tests/chains/scenarios/nameconstraints.cfg +@@ -159,12 +159,12 @@ verify NameConstraints.dcissblocked:x + verify NameConstraints.dcissallowed:x + result pass + + # Subject: "O = IPA.LOCAL 201901211552, CN = OCSP Subsystem" + # + # This tests that a non server certificate (i.e. id-kp-serverAuth + # not present in EKU) does *NOT* have CN treated as dnsName for + # purposes of Name Constraints validation +-verify NameConstraints.ocsp1:x +- usage 10 +- result pass ++#verify NameConstraints.ocsp1:x ++# usage 10 ++# result pass + diff --git a/nss.spec b/nss.spec index 90afceb..1d3523c 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.29.0 -%global nss_version 3.59.0 +%global nss_version 3.60.1 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -44,7 +44,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 3%{?dist} +Release: 1%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -107,6 +107,7 @@ Patch2: nss-539183.patch # but it doesn't hurt to keep it. Patch4: iquote.patch Patch12: nss-signtool-format.patch +Patch13: nss-turn-off-expired-ocsp-cert.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 Patch20: nss-gcm-param-default-pkcs11v2.patch @@ -907,6 +908,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Jan 21 2021 Bob Relyea - 3.60.1-1 +- Update to NSS 3.60.1 + * Tue Dec 15 2020 Bob Relyea - 3.59.0-3 - Back out strict SHA-1 signature control because firefox Addon system is still using sha-1 signatures diff --git a/sources b/sources index da88737..f801005 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.59.tar.gz) = 8963e846f2ff7222457ae59f042672cf4e44f7752807226f46c215a772fd1cbd65d0ce634da4afb698eabd4eb1c1e78146cc2a089339ada11da03d259c609a38 +SHA512 (nss-3.60.1.tar.gz) = ba398ddad6f90f3562a041b7fd5fc7b72eb20961cc5c1f4890c3b0d95d438404b26ae6feb54cb8c650707134479a915e1f522f0e9257bc2ede053dd0811156d5 From a22e2da6eb1753819e2ee71714308308e4d7b9b8 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Tue, 23 Feb 2021 16:41:10 -0800 Subject: [PATCH 15/21] Rebase to nss 3.62.0 --- .gitignore | 1 + nss-turn-off-expired-ocsp-cert.patch | 19 ------------------- nss.spec | 6 ++++-- sources | 2 +- 4 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 nss-turn-off-expired-ocsp-cert.patch diff --git a/.gitignore b/.gitignore index d08b965..7b3c503 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ TestUser51.cert /nss-3.58.tar.gz /nss-3.59.tar.gz /nss-3.60.1.tar.gz +/nss-3.62.tar.gz diff --git a/nss-turn-off-expired-ocsp-cert.patch b/nss-turn-off-expired-ocsp-cert.patch deleted file mode 100644 index dfbbb50..0000000 --- a/nss-turn-off-expired-ocsp-cert.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/tests/chains/scenarios/nameconstraints.cfg b/tests/chains/scenarios/nameconstraints.cfg ---- a/tests/chains/scenarios/nameconstraints.cfg -+++ b/tests/chains/scenarios/nameconstraints.cfg -@@ -159,12 +159,12 @@ verify NameConstraints.dcissblocked:x - verify NameConstraints.dcissallowed:x - result pass - - # Subject: "O = IPA.LOCAL 201901211552, CN = OCSP Subsystem" - # - # This tests that a non server certificate (i.e. id-kp-serverAuth - # not present in EKU) does *NOT* have CN treated as dnsName for - # purposes of Name Constraints validation --verify NameConstraints.ocsp1:x -- usage 10 -- result pass -+#verify NameConstraints.ocsp1:x -+# usage 10 -+# result pass - diff --git a/nss.spec b/nss.spec index 1d3523c..d85d780 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.29.0 -%global nss_version 3.60.1 +%global nss_version 3.62.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -107,7 +107,6 @@ Patch2: nss-539183.patch # but it doesn't hurt to keep it. Patch4: iquote.patch Patch12: nss-signtool-format.patch -Patch13: nss-turn-off-expired-ocsp-cert.patch %if 0%{?fedora} < 34 %if 0%{?rhel} < 9 Patch20: nss-gcm-param-default-pkcs11v2.patch @@ -908,6 +907,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Feb 23 2021 Bob Relyea - 3.62.0-1 +- Update to NSS 3.62.0 + * Thu Jan 21 2021 Bob Relyea - 3.60.1-1 - Update to NSS 3.60.1 diff --git a/sources b/sources index f801005..4f0292d 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.60.1.tar.gz) = ba398ddad6f90f3562a041b7fd5fc7b72eb20961cc5c1f4890c3b0d95d438404b26ae6feb54cb8c650707134479a915e1f522f0e9257bc2ede053dd0811156d5 +SHA512 (nss-3.62.tar.gz) = 7044008ea8e5d6f658da96e202a896e24a1ffa29d7ca862f32ed37cfa09adf8c2d5fbc371e3af6bc5151b2d1216c38207976b41888d5ad8efd4dc3049cb5831d From c8f06edaade9664fff8a039756905e1a3d5a435f Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Thu, 25 Mar 2021 08:58:12 -0700 Subject: [PATCH 16/21] Update to NSS 3.63.0 --- .gitignore | 1 + nss.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7b3c503..3320bc5 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ TestUser51.cert /nss-3.59.tar.gz /nss-3.60.1.tar.gz /nss-3.62.tar.gz +/nss-3.63.tar.gz diff --git a/nss.spec b/nss.spec index d85d780..8a9cf20 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ -%global nspr_version 4.29.0 -%global nss_version 3.62.0 +%global nspr_version 4.30.0 +%global nss_version 3.63.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -907,6 +907,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Mar 25 2021 Bob Relyea - 3.63.0-1 +- Update to NSS 3.63.0 + * Tue Feb 23 2021 Bob Relyea - 3.62.0-1 - Update to NSS 3.62.0 diff --git a/sources b/sources index 4f0292d..a925181 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.62.tar.gz) = 7044008ea8e5d6f658da96e202a896e24a1ffa29d7ca862f32ed37cfa09adf8c2d5fbc371e3af6bc5151b2d1216c38207976b41888d5ad8efd4dc3049cb5831d +SHA512 (nss-3.63.tar.gz) = 2f1f75dce7fd049453cbcf53263a3d9d4d9e62ad2cc2fef4dd0d5645fe14dad4ce47ed64aae507a09214d7fccbe83c142844121f55b44783e5a1bcfe24ea671c From 95f9aab4c01547ca901792094205e358ffed3bd8 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Fri, 28 May 2021 10:33:20 -0700 Subject: [PATCH 17/21] Rebase to NSS 3.65 --- .gitignore | 2 + nss-3.65-disable-hw-ppc.patch | 19 + nss-signtool-format.patch | 23 +- nss-sql-man-page.patch | 749 ++++++++++++++++++++++++++++++++++ nss.spec | 11 +- sources | 2 +- 6 files changed, 788 insertions(+), 18 deletions(-) create mode 100644 nss-3.65-disable-hw-ppc.patch create mode 100644 nss-sql-man-page.patch diff --git a/.gitignore b/.gitignore index 3320bc5..ef3eae7 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ TestUser51.cert /nss-3.60.1.tar.gz /nss-3.62.tar.gz /nss-3.63.tar.gz +/nss-3.65.tar.gz + diff --git a/nss-3.65-disable-hw-ppc.patch b/nss-3.65-disable-hw-ppc.patch new file mode 100644 index 0000000..e435bcf --- /dev/null +++ b/nss-3.65-disable-hw-ppc.patch @@ -0,0 +1,19 @@ +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-signtool-format.patch b/nss-signtool-format.patch index f54e7f3..5f146f1 100644 --- a/nss-signtool-format.patch +++ b/nss-signtool-format.patch @@ -26,28 +26,19 @@ diff --git a/cmd/modutil/install.c b/cmd/modutil/install.c diff --git a/cmd/signtool/util.c b/cmd/signtool/util.c --- a/cmd/signtool/util.c +++ b/cmd/signtool/util.c -@@ -132,17 +132,20 @@ rm_dash_r(char *path) - if (!dir) { - PR_fprintf(errorFD, "Error: Unable to open directory %s.\n", path); - errorCount++; - return -1; - } - +@@ -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); -+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) { + sprintf(filename, "%s/%s", path, entry->name); ++ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name ++) >= sizeof(filename)) { + errorCount++; ++ PR_CloseDir(dir); + return -1; + } - if (rm_dash_r(filename)) + if (rm_dash_r(filename)) { + PR_CloseDir(dir); return -1; - } - - if (PR_CloseDir(dir) != PR_SUCCESS) { - PR_fprintf(errorFD, "Error: Could not close %s.\n", path); - errorCount++; - return -1; diff --git a/lib/libpkix/pkix/util/pkix_list.c b/lib/libpkix/pkix/util/pkix_list.c --- a/lib/libpkix/pkix/util/pkix_list.c +++ b/lib/libpkix/pkix/util/pkix_list.c diff --git a/nss-sql-man-page.patch b/nss-sql-man-page.patch new file mode 100644 index 0000000..1084856 --- /dev/null +++ b/nss-sql-man-page.patch @@ -0,0 +1,749 @@ +# 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 8a9cf20..1a0cd4e 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.30.0 -%global nss_version 3.63.0 +%global nss_version 3.65.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -117,6 +117,12 @@ Patch30: nss-fedora-btrf-sql-hack.patch # can drop this patch once crypto-policies has been updated Patch31: nss-3.53.1-revert_rhel8_unsafe_policy_change.patch Patch33: nss-fedora-relax-sha1.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=1566124 +# still needs to be fixed. disable hw support until it is. +Patch34: nss-3.65-disable-hw-ppc.patch + +# https://bugzilla.mozilla.org/show_bug.cgi?id=1712184 +Patch39: nss-sql-man-page.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -907,6 +913,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Fri May 21 2021 Bob Relyea - 3.65.0-1 +- Update NSS to 3.65 + * Thu Mar 25 2021 Bob Relyea - 3.63.0-1 - Update to NSS 3.63.0 diff --git a/sources b/sources index a925181..221b226 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.63.tar.gz) = 2f1f75dce7fd049453cbcf53263a3d9d4d9e62ad2cc2fef4dd0d5645fe14dad4ce47ed64aae507a09214d7fccbe83c142844121f55b44783e5a1bcfe24ea671c +SHA512 (nss-3.65.tar.gz) = 6f980f44056c69c74754124ce16d4880fb47440146d55906584f70d1be8e74885570308914d4482b3ee676a1f5b1e529616eae8ccd6906d678394dd929dd0825 From deb63b62d4cf621b17a163f7ac85d27edd5d2df2 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Thu, 17 Jun 2021 15:34:30 -0700 Subject: [PATCH 18/21] Rebase to NSS 3.67 --- .gitignore | 1 + nss.spec | 13 +++++-------- sources | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ef3eae7..8e3a222 100644 --- a/.gitignore +++ b/.gitignore @@ -60,4 +60,5 @@ TestUser51.cert /nss-3.62.tar.gz /nss-3.63.tar.gz /nss-3.65.tar.gz +/nss-3.67.tar.gz diff --git a/nss.spec b/nss.spec index 1a0cd4e..c931831 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ -%global nspr_version 4.30.0 -%global nss_version 3.65.0 +%global nspr_version 4.31.0 +%global nss_version 3.67.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -117,12 +117,6 @@ Patch30: nss-fedora-btrf-sql-hack.patch # can drop this patch once crypto-policies has been updated Patch31: nss-3.53.1-revert_rhel8_unsafe_policy_change.patch Patch33: nss-fedora-relax-sha1.patch -# https://bugzilla.mozilla.org/show_bug.cgi?id=1566124 -# still needs to be fixed. disable hw support until it is. -Patch34: nss-3.65-disable-hw-ppc.patch - -# https://bugzilla.mozilla.org/show_bug.cgi?id=1712184 -Patch39: nss-sql-man-page.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -913,6 +907,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Thu Jul 17 2021 Bob Relyea - 3.67.0-1 +- Update NSS to 3.67 + * Fri May 21 2021 Bob Relyea - 3.65.0-1 - Update NSS to 3.65 diff --git a/sources b/sources index 221b226..0e37c06 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.65.tar.gz) = 6f980f44056c69c74754124ce16d4880fb47440146d55906584f70d1be8e74885570308914d4482b3ee676a1f5b1e529616eae8ccd6906d678394dd929dd0825 +SHA512 (nss-3.67.tar.gz) = 1d3fa3fafbf3e54c9c3b54b0b3c291aebb48542380a1b704fa07359d3cefab93f166b31928c9db190ed58118e289e67ce8aa1619e4219d69b2c098484a22bc9d From cd478aeea9b086b8d62a42fc72c3d115805f5f1d Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Thu, 17 Jun 2021 18:32:23 -0700 Subject: [PATCH 19/21] fix changelog date --- nss.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nss.spec b/nss.spec index c931831..a65fac5 100644 --- a/nss.spec +++ b/nss.spec @@ -907,7 +907,7 @@ update-crypto-policies &> /dev/null || : %changelog -* Thu Jul 17 2021 Bob Relyea - 3.67.0-1 +* Thu Jun 17 2021 Bob Relyea - 3.67.0-1 - Update NSS to 3.67 * Fri May 21 2021 Bob Relyea - 3.65.0-1 From 4214661da71126944b551fb2e17170ce787f2b75 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Tue, 10 Aug 2021 14:31:47 -0700 Subject: [PATCH 20/21] Rebase to NSS 3.69 --- .gitignore | 1 + nss.spec | 9 +++++---- sources | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8e3a222..b092188 100644 --- a/.gitignore +++ b/.gitignore @@ -61,4 +61,5 @@ TestUser51.cert /nss-3.63.tar.gz /nss-3.65.tar.gz /nss-3.67.tar.gz +/nss-3.69.tar.gz diff --git a/nss.spec b/nss.spec index a65fac5..b64eb22 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ -%global nspr_version 4.31.0 -%global nss_version 3.67.0 +%global nspr_version 4.32.0 +%global nss_version 3.69.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -112,8 +112,6 @@ Patch12: nss-signtool-format.patch Patch20: nss-gcm-param-default-pkcs11v2.patch %endif %endif -# can drop this patch when the underlying btrfs/sqlite issue is solved -Patch30: nss-fedora-btrf-sql-hack.patch # can drop this patch once crypto-policies has been updated Patch31: nss-3.53.1-revert_rhel8_unsafe_policy_change.patch Patch33: nss-fedora-relax-sha1.patch @@ -907,6 +905,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Aug 10 2021 Bob Relyea - 3.69.0-1 +- Update NSS to 3.69 + * Thu Jun 17 2021 Bob Relyea - 3.67.0-1 - Update NSS to 3.67 diff --git a/sources b/sources index 0e37c06..92b3bea 100644 --- a/sources +++ b/sources @@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.67.tar.gz) = 1d3fa3fafbf3e54c9c3b54b0b3c291aebb48542380a1b704fa07359d3cefab93f166b31928c9db190ed58118e289e67ce8aa1619e4219d69b2c098484a22bc9d +SHA512 (nss-3.69.tar.gz) = 9dd824b3e96aa5a032d5005cdf60a55efac23f69f3857cd1f4337f3ebad92fc2354bb05ed85f04a368e55306a46ebd17a91f7f432f1c191a96e99aecfa62cfdf From ab8074dc448ff56a2fae978d7625a05417aca372 Mon Sep 17 00:00:00 2001 From: Bob Relyea Date: Tue, 5 Oct 2021 08:23:46 -0700 Subject: [PATCH 21/21] Rebase to NSS 3.71: Network Security Services (NSS) 3.71 was released on 30 September 2021. The HG tag is NSS_3_71_RTM. This version of NSS requires NSPR 4.32 or newer. NSS 3.71 source distributions are available on ftp.mozilla.org for secure HTTPS download: Changes: - Bug 1717716 - Set nssckbi version number to 2.52. - Bug 1667000 - Respect server requirements of tlsfuzzer/test-tls13-signature-algorithms.py - Bug 1373716 - Import of PKCS#12 files with Camellia encryption is not supported - Bug 1717707 - Add HARICA Client ECC Root CA 2021. - Bug 1717707 - Add HARICA Client RSA Root CA 2021. - Bug 1717707 - Add HARICA TLS ECC Root CA 2021. - Bug 1717707 - Add HARICA TLS RSA Root CA 2021. - Bug 1728394 - Add TunTrust Root CA certificate to NSS. ------------------------------------- Network Security Services (NSS) 3.70 was released on 4 September 2021. The HG tag is NSS_3_70_RTM. This version of NSS requires NSPR 4.32 or newer. NSS 3.70 source distributions are available on ftp.mozilla.org for secure HTTPS download: Changes: - Documentation: release notes for NSS 3.70. - Documentation: release notes for NSS 3.69.1. - Bug 1726022 - Update test case to verify fix. - Bug 1714579 - Explicitly disable downgrade check in TlsConnectStreamTls13.EchOuterWith12Max - Bug 1714579 - Explicitly disable downgrade check in TlsConnectTest.DisableFalseStartOnFallback - Formatting for lib/util - Bug 1681975 - Avoid using a lookup table in nssb64d. - Bug 1724629 - Use HW accelerated SHA2 on AArch64 Big Endian. - Bug 1714579 - Change default value of enableHelloDowngradeCheck to true. - Formatting for gtests/pk11_gtest/pk11_hpke_unittest.cc - Bug 1726022 - Cache additional PBE entries. - Bug 1709750 - Read HPKE vectors from official JSON. - Documentation: update for NSS 3.69 release. --- .gitignore | 2 +- nss.spec | 5 ++++- sources | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b092188..61b579c 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,4 @@ TestUser51.cert /nss-3.65.tar.gz /nss-3.67.tar.gz /nss-3.69.tar.gz - +/nss-3.71.tar.gz diff --git a/nss.spec b/nss.spec index b64eb22..f72fedb 100644 --- a/nss.spec +++ b/nss.spec @@ -1,5 +1,5 @@ %global nspr_version 4.32.0 -%global nss_version 3.69.0 +%global nss_version 3.71.0 %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global saved_files_dir %{_libdir}/nss/saved %global dracutlibdir %{_prefix}/lib/dracut @@ -905,6 +905,9 @@ update-crypto-policies &> /dev/null || : %changelog +* Tue Oct 5 2021 Bob Relyea - 3.71.0-1 +- Update NSS to 3.71 + * Tue Aug 10 2021 Bob Relyea - 3.69.0-1 - Update NSS to 3.69 diff --git a/sources b/sources index 92b3bea..0f47caf 100644 --- a/sources +++ b/sources @@ -3,4 +3,5 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403 SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 -SHA512 (nss-3.69.tar.gz) = 9dd824b3e96aa5a032d5005cdf60a55efac23f69f3857cd1f4337f3ebad92fc2354bb05ed85f04a368e55306a46ebd17a91f7f432f1c191a96e99aecfa62cfdf +SHA512 (nss-3.71.tar.gz) = a4a724dc4e8677965b6245ea2309790d31ec7719658e2b349eb67c9008082132c76277340d15e4fdd8d2fe1f560ae6803fb038d023c3dfd2e3772fa3b77720e2 +