Compare commits

...

67 Commits

Author SHA1 Message Date
fa66cdcf23
Disable tests on riscv64
[..]
Tests summary:
--------------
Passed:             82622
Failed:             1
Failed with core:   0
ASan failures:      0
Unknown status:     2
TinderboxPrint:Unknown: 2
error: Bad exit status from /var/tmp/rpm-tmp.C2RdRB (%check)
[..]

Most likely:
[..]
------------- time ----------------------
real 1.40 user 1.07 sys 0.31
1 seconds
sdr.sh: #9: pwdecrypt no time regression  - FAILED
[..]

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-11-26 06:00:25 +02:00
Bob Relyea
f755c6a832 Update NSS to 3.85 (rhbz#214318) 2022-11-17 16:19:49 -08:00
Bob Relyea
e755824ad7 Rebase to nss 3.83 and nspr 4.35 2022-09-20 22:30:03 -07:00
Bob Relyea
37b1b613d2 Fix release tag syntax error 2022-07-21 12:44:36 -07:00
Bob Relyea
3b1f91342a Rebase to nss 3.81 2022-07-21 12:32:20 -07:00
Bob Relyea
a9f44e8e59 bug#2097663
Fix crash when getting client cert and there is none in the database.
2022-06-16 14:22:48 -07:00
Bob Relyea
e5848562c6 Rebase NSS to 3.79
Rebase NSPR to 3.43
2022-05-31 14:12:36 -07:00
Bob Relyea
8a88a4bee4 use the correct tar file 2022-04-04 16:37:02 -07:00
Bob Relyea
8c57561b09 Update to nss 3.77 2022-04-04 16:22:35 -07:00
Bob Relyea
5b97003412 Resolves: rhbz#2046773
Update to NSS 3.75
fix FTBFS issue
2022-02-05 11:05:11 -08:00
Fedora Release Engineering
1ef41fe34b - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 21:26:50 +00:00
Bob Relyea
7939bc1609 Sigh, bump nspr release number 2021-12-01 19:30:55 -08:00
Bob Relyea
167cff7975 Resolves: rhbz#2028186
Update to nss 3.73
Fixes cve-2021043527
2021-12-01 11:22:54 -08:00
Bob Relyea
2fff7ce02e Update change log for previous checkin 2021-10-04 10:39:52 -07:00
Bob Relyea
8138473262 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: <https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_71_RTM/src/>

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: <https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_70_RTM/src/>

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.
2021-10-04 09:20:44 -07:00
Bob Relyea
af791c1ba6 Resolves: rhbz#1986627
Turn on LTO in NSS
2021-08-10 16:28:38 -07:00
Bob Relyea
a9f294d68c NSS 3.69 already has the sqlite patch. 2021-08-10 10:07:04 -07:00
Bob Relyea
8abf80e788 Why is rpm trying to expand stuff in a comment? (sigh) make it happy for now 2021-08-10 09:28:22 -07:00
Bob Relyea
3b8e99f54d update actual release verison for nss as well as nspr (sigh) 2021-08-10 09:21:10 -07:00
Bob Relyea
89863272ee Rebase to nss 3.69 and nspr 4.32 2021-08-10 08:50:20 -07:00
Bob Relyea
4a9ae95d97 Update nss.spec to handle scripts line rpmdev_bumpspec 2021-07-28 14:11:18 -07:00
Bob Relyea
ff3ede0b35 Mass rebuild messed up nss/nspr versioning, straighten that out now.
https://bugzilla.redhat.com/show_bug.cgi?id=1986522
2021-07-27 15:05:31 -07:00
Fedora Release Engineering
8a77a14ab9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:21:16 +00:00
Bob Relyea
b982271bc3 Rebase to NSS 3.67 for Firefox 91 2021-06-17 15:11:36 -07:00
Bob Relyea
5caf7e1665 Fix man page bug in the no-dbm man page patch 2021-05-29 10:35:12 -07:00
Bob Relyea
f760740a2b Bump NSPR build number 2021-05-28 10:24:33 -07:00
Bob Relyea
0bf3c58252 Update to NSS 3.65
- also handle man page update from NSS 3.66
  - disable ppcle hw support until it passes NSS tests
2021-05-27 18:15:48 -07:00
Bob Relyea
9ff440494f - Update to 3.63
- Update to NSPR 2.30
- Remove old dbm files and man pages
2021-03-23 22:33:58 -07:00
Bob Relyea
0b58cf9e56 Update NSPR release number to avoid conflicts 2021-02-25 10:40:22 +01:00
Bob Relyea
535c4fae51 Rebase to nss 3.62.0 2021-02-23 14:19:08 -08:00
Kalev Lember
0b3033dcf4 Rebuild to fix broken nspr dependencies
Problem: conflicting requests
- nothing provides nspr(x86-64) = 4.29.0-11.fc34 needed by nspr-devel-4.29.0-11.fc34.1.x86_64
2021-02-01 19:26:35 +01:00
Fedora Release Engineering
a580405acc - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:43:22 +00:00
Bob Relyea
37aceda53b update nspr release number 2021-01-22 22:55:57 +00:00
Bob Relyea
2a6b0539cc Update requires so that we get the correct crypto policies
(or all RSA and ECDSA signatures wil fail)
2021-01-22 18:07:01 +00:00
Bob Relyea
4d0b92b333 Don't remove additional sources from the src file 2021-01-22 00:27:12 +00:00
Bob Relyea
245982b2c4 Thu Jan 21 2021 Bob Relyea <rrelyea@redhat.com> - 3.60.1-1
Update to NSS 3.60.1
 Drop NODEPEND_FREEBL and LOWHASH
 bug 1919033
2021-01-22 00:10:22 +00:00
Tom Stellard
6f68ada6a7 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-07 06:00:39 +00:00
Bob Relyea
4ecb833a82 - Work around btrfs/sqlite bug
- Disable new policy entries until crypto-polices has been updated
2020-12-12 10:10:46 -08:00
Daiki Ueno
8f25129254 Update to NSS 3.59 2020-12-10 19:12:51 +01:00
Daiki Ueno
a0090873a5 Replace %%{version} references in %%build with %%{nss_version}
Suggested by Dmitry Butskoy in bz#1895447.
2020-11-07 07:13:59 +01:00
Daiki Ueno
b09fff4da1 Add operational workaround for NVR clashes 2020-10-30 12:55:26 +01:00
Daiki Ueno
466a27e84d Use the lockstep release numbering for both nspr and nss
Fixes #1892874
2020-10-30 11:28:28 +01:00
Jeff Law
51aa05789c Disable -Warray-parameter warning for gcc-11 2020-10-29 13:03:57 -06:00
Daiki Ueno
3a93ebecac Whitespace cleanup 2020-10-29 13:11:08 +01:00
Daiki Ueno
ef0e3207fd Consolidate NSPR with this package
NSPR is no longer used outside of NSS, it makes little sense to keep
it as a separate source package, but costs the packaging burden as NSS
requires a buildroot override.
2020-10-28 15:23:41 +01:00
Bob Relyea
e698f2504c Resolves: rhbz#1861495
Don't fail OCSP validations for intermediate certs if the root certs
are signed by sha1 and sha1 is disabled.
2020-10-26 16:59:30 -07:00
Daiki Ueno
0d4d4780af Revert the last change, tolerate the first CCS in TLS 1.3 2020-10-26 06:55:42 +01:00
Daiki Ueno
0d673b36cc Enable TLS 1.3 middlebox compatibility mode by default 2020-10-22 17:06:28 +02:00
Daiki Ueno
f73f7ce1e4 Install pk11hpke.h 2020-10-20 11:12:33 +02:00
Daiki Ueno
e5fecd4da4 Update to NSS 3.58 2020-10-20 09:31:29 +02:00
Daiki Ueno
8b34570da2 Remove upstreamed patch 2020-09-20 16:01:57 +02:00
Daiki Ueno
6b70690de5 Update to NSS 3.57 2020-09-19 09:13:11 +02:00
Daiki Ueno
a73f735839 Update the AArch64 patch 2020-09-05 11:08:21 +02:00
Daiki Ueno
2bb137e19d Fix AArch64 build failure 2020-09-05 10:46:10 +02:00
Daiki Ueno
c77e79a71e Update to NSS 3.56 2020-08-24 08:48:58 +02:00
Daiki Ueno
614e62c67d Fix DBM backend disablement
Also add scriptlet to migrate old DBM databases.
2020-08-15 13:40:04 +02:00
Jeff Law
d4e86043ee Disable LTO for now 2020-08-08 13:15:55 -06:00
Daiki Ueno
661472da51 Remove unused patch 2020-08-02 07:40:16 +02:00
Daiki Ueno
08dea7d5c7 Update to NSS 3.55
Also disable DBM support as per:
https://fedoraproject.org/wiki/Changes/NSSDBMRemoval
2020-08-02 07:36:17 +02:00
Fedora Release Engineering
2d5d6d2cf7 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 06:34:08 +00:00
Fedora Release Engineering
d81f1e4f76 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 11:55:03 +00:00
Daiki Ueno
c2e2fc0161 Update to NSS 3.54 2020-07-15 11:28:22 +02:00
Daiki Ueno
208c55f1d2 Update after crypto-policies packaging change
Suggested by Tomas Mraz in:
https://bugzilla.redhat.com/show_bug.cgi?id=1848649#c7
2020-06-22 15:21:42 +02:00
Bob Relyea
27b7534706 Include correct .patch file for previous commit 2020-06-05 08:11:56 -07:00
Bob Relyea
965c121198 Reolves: rhbz#1843417
Cannot compile code with pk11pub.h (an nss header) with -Werror=strict-prototypes
2020-06-04 17:03:01 -07:00
Daiki Ueno
9699d7efc7 Update build procedure after removal of mkdepend 2020-06-02 08:52:10 +02:00
Daiki Ueno
3f35603021 Update to NSS 3.53 2020-06-01 08:08:02 +02:00
16 changed files with 1677 additions and 133 deletions

27
.gitignore vendored
View File

@ -49,3 +49,30 @@ TestUser51.cert
/nss-3.51.tar.gz /nss-3.51.tar.gz
/nss-3.51.1.tar.gz /nss-3.51.1.tar.gz
/nss-3.52.tar.gz /nss-3.52.tar.gz
/nss-3.53.tar.gz
/nss-3.54.tar.gz
/nss-3.55.tar.gz
/nss-3.56.tar.gz
/nss-3.57.tar.gz
/nss-3.58.tar.gz
/nspr-4.29.tar.gz
/nss-3.59.tar.gz
/nss-3.60.1.tar.gz
/nss-3.62.tar.gz
/nss-3.63.tar.gz
/nspr-4.30.tar.gz
/nss-3.65.tar.gz
/nss-3.67.tar.gz
/nspr-4.31.tar.gz
/nss-3.69.tar.gz
/nspr-4.32.tar.gz
/nss-3.71.tar.gz
/nss-3.73.tar.gz
/nss-3.75.tar.gz
/nss-3.77.tar.gz
/nss-3.79.tar.gz
/nspr-4.34.tar.gz
/nss-3.81.tar.gz
/nss-3.83.tar.gz
/nspr-4.35.tar.gz
/nss-3.85.tar.gz

37
nspr-config-pc.patch Normal file
View File

@ -0,0 +1,37 @@
diff -up nspr/config/nspr-config.in.flags nspr/config/nspr-config.in
--- nspr/config/nspr-config.in.flags 2013-05-29 13:46:34.147971410 -0700
+++ nspr/config/nspr-config.in 2013-05-29 14:17:10.990838914 -0700
@@ -102,7 +102,7 @@ if test -z "$includedir"; then
includedir=@includedir@
fi
if test -z "$libdir"; then
- libdir=@libdir@
+ libdir=`pkg-config --variable=libdir nspr`
fi
if test "$echo_prefix" = "yes"; then
@@ -136,12 +136,12 @@ if test "$echo_libs" = "yes"; then
if test -n "$lib_nspr"; then
libdirs="$libdirs -lnspr${major_version}"
fi
- os_ldflags="@LDFLAGS@"
+ os_ldflags=`pkg-config --variable=ldflags nspr`
for i in $os_ldflags ; do
if echo $i | grep \^-L >/dev/null; then
libdirs="$libdirs $i"
fi
done
- echo $libdirs @OS_LIBS@
+ echo $libdirs `pkg-config --variable=os_libs nspr`
fi
diff -up nspr/config/nspr.pc.in.flags nspr/config/nspr.pc.in
--- nspr/config/nspr.pc.in.flags 2013-05-29 13:48:15.026643570 -0700
+++ nspr/config/nspr.pc.in 2013-05-29 13:49:47.795202949 -0700
@@ -6,5 +6,5 @@ includedir=@includedir@
Name: NSPR
Description: The Netscape Portable Runtime
Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@
-Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@
+Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ @OS_LIBS@
Cflags: -I@includedir@

127
nspr-config.xml Normal file
View File

@ -0,0 +1,127 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY date SYSTEM "date.xml">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="nspr-config">
<refentryinfo>
<date>&date;</date>
<title>Netscape Portable Runtime</title>
<productname>nspr</productname>
<productnumber>&version;</productnumber>
</refentryinfo>
<refmeta>
<refentrytitle>nspr-config</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>nspr-config</refname>
<refpurpose>Return meta information about nspr libraries</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>nspr-config</command>
<arg><option>--prefix</option></arg>
<arg><option>--exec-prefix</option></arg>
<arg><option>--includedir</option></arg>
<arg><option>--libs</option></arg>
<arg><option>--cflags</option></arg>
<arg><option>--libdir</option></arg>
<arg><option>--version</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection id="description">
<title>Description</title>
<para><command>nspr-config</command> is a shell script which can be used to obtain gcc options for building client pacakges of nspr.</para>
</refsection>
<refsection>
<title>Options</title>
<variablelist>
<varlistentry>
<term><option>--prefix</option></term>
<listitem><simpara>Returns the top level system directory under which the nspr libraries are installed.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--exec-prefix</option></term>
<listitem><simpara>Returns the top level system directory under which any nspr binaries would be installed.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--includedir</option> <replaceable>count</replaceable></term>
<listitem><simpara>Returns the path to the directory were the nspr headers are installed.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--version</option></term>
<listitem><simpara>Returns the upstream version of nspr in the form major_version-minor_version-patch_version.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--libs</option></term>
<listitem><simpara>Returns the compiler linking flags.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--cflags</option></term>
<listitem><simpara>Returns the compiler include flags.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--libdir</option></term>
<listitem><simpara>Returns the path to the directory were the nspr libraries are installed.</simpara></listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Examples</title>
<para>The following example will query for both include path and linkage flags:
<programlisting>
/usr/bin/nspr-config --cflags --libs
</programlisting>
</para>
</refsection>
<refsection>
<title>Files</title>
<para><filename>/usr/bin/nspr-config</filename></para>
</refsection>
<refsection>
<title>See also</title>
<para>pkg-config(1)</para>
</refsection>
<refsection id="authors">
<title>Authors</title>
<para>The NSPR liraries were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</para>
<para>
Authors: Elio Maldonado &lt;emaldona@redhat.com>.
</para>
</refsection>
<!-- don't change -->
<refsection id="license">
<title>LICENSE</title>
<para>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
</para>
</refsection>
</refentry>

51
nspr-gcc-atomics.patch Normal file
View File

@ -0,0 +1,51 @@
diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
--- ./pr/include/md/_linux.h.gcc-atomics 2022-09-20 11:23:22.008942926 -0700
+++ ./pr/include/md/_linux.h 2022-09-20 11:34:45.536751340 -0700
@@ -105,6 +105,15 @@
#endif
#if defined(__i386__)
+#if defined(__GNUC__)
+/* Use GCC built-in functions */
+#define _PR_HAVE_ATOMIC_OPS
+#define _MD_INIT_ATOMIC()
+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
+#else
#define _PR_HAVE_ATOMIC_OPS
#define _MD_INIT_ATOMIC()
extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val);
@@ -116,6 +125,7 @@ extern PRInt32 _PR_x86_AtomicAdd(PRInt32
extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
#define _MD_ATOMIC_SET _PR_x86_AtomicSet
#endif
+#endif
#if defined(__ia64__)
#define _PR_HAVE_ATOMIC_OPS
@@ -131,6 +141,15 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt3
#endif
#if defined(__x86_64__)
+#if defined(__GNUC__)
+/* Use GCC built-in functions */
+#define _PR_HAVE_ATOMIC_OPS
+#define _MD_INIT_ATOMIC()
+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
+#else
#define _PR_HAVE_ATOMIC_OPS
#define _MD_INIT_ATOMIC()
extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val);
@@ -142,6 +161,7 @@ extern PRInt32 _PR_x86_64_AtomicAdd(PRIn
extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
#endif
+#endif
#if defined(__loongarch__)
#if defined(__GNUC__)

View File

@ -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

View File

@ -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(<sys/auxv.h>)
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;
}

View File

@ -0,0 +1,23 @@
diff --git a/lib/ssl/authcert.c b/lib/ssl/authcert.c
--- a/lib/ssl/authcert.c
+++ b/lib/ssl/authcert.c
@@ -212,17 +212,17 @@ NSS_GetClientAuthData(void *arg,
pw_arg);
} else {
int nnames = 0;
char **names = ssl_DistNamesToStrings(caNames, &nnames);
rv = CERT_FilterCertListByCANames(certList, nnames, names,
certUsageSSLClient);
ssl_FreeDistNamesStrings(names, nnames);
}
- if ((rv != SECSuccess) || CERT_LIST_EMPTY(certList)) {
+ if ((rv != SECSuccess) || (certList && CERT_LIST_EMPTY(certList))) {
CERT_DestroyCertList(certList);
certList = NULL;
}
}
if (certList == NULL) {
/* no user certs meeting the nickname/usage requirements found */
return SECFailure;
}

View File

@ -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) {

View File

@ -0,0 +1,42 @@
diff --git a/tests/chains/chains.sh b/tests/chains/chains.sh
--- a/tests/chains/chains.sh
+++ b/tests/chains/chains.sh
@@ -917,7 +917,7 @@
done
VFY_OPTS_TNAME="${DB_OPT} ${ENGINE} ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${TRUST_OPT}"
- VFY_OPTS_ALL="${DB_OPT} ${ENGINE} -vv ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${VFY_CERTS} ${TRUST_OPT}"
+ VFY_OPTS_ALL="${DB_OPT} ${ENGINE} -vv ${VFY_TIME_OPT} ${TRUST_AND_DB_OPT} ${REV_OPTS} ${FETCH_OPT} ${USAGE_OPT} ${POLICY_OPT} ${VFY_CERTS} ${TRUST_OPT}"
TESTNAME="Verifying certificate(s) ${VFY_LIST} with flags ${VFY_OPTS_TNAME}"
echo "${SCRIPTNAME}: ${TESTNAME}"
@@ -1118,6 +1118,7 @@
;;
"verify")
VERIFY="${VALUE}"
+ VFY_TIME_OPT=
TRUST=
TRUST_AND_DB=
POLICY=
@@ -1126,6 +1127,9 @@
REV_OPTS=
USAGE_OPT=
;;
+ "at_time")
+ VFY_TIME_OPT="-b ${VALUE}"
+ ;;
"cert")
VERIFY="${VERIFY} ${VALUE}"
;;
diff --git a/tests/chains/scenarios/realcerts.cfg b/tests/chains/scenarios/realcerts.cfg
--- a/tests/chains/scenarios/realcerts.cfg
+++ b/tests/chains/scenarios/realcerts.cfg
@@ -22,6 +22,7 @@
verify PayPalEE:x
policy OID.2.16.840.1.114412.2.1
+ at_time 2201010000Z
result pass
verify BrAirWaysBadSig:x

View File

@ -1,21 +0,0 @@
diff -up ./lib/util/pkcs11n.h.aes_gcm_pkcs11_v2 ./lib/util/pkcs11n.h
--- ./lib/util/pkcs11n.h.aes_gcm_pkcs11_v2 2020-05-13 13:44:11.312405744 -0700
+++ ./lib/util/pkcs11n.h 2020-05-13 13:45:23.951723660 -0700
@@ -605,7 +605,7 @@ typedef struct CK_NSS_GCM_PARAMS {
typedef CK_NSS_GCM_PARAMS CK_PTR CK_NSS_GCM_PARAMS_PTR;
/* deprecated #defines. Drop in future NSS releases */
-#ifdef NSS_PKCS11_2_0_COMPAT
+#ifndef NSS_PKCS11_3_0_STRICT
/* defines that were changed between NSS's PKCS #11 and the Oasis headers */
#define CKF_EC_FP CKF_EC_F_P
@@ -664,7 +664,7 @@ typedef CK_NSS_GCM_PARAMS CK_PTR CK_GCM_
#define CKT_NETSCAPE_VALID CKT_NSS_VALID
#define CKT_NETSCAPE_VALID_DELEGATOR CKT_NSS_VALID_DELEGATOR
#else
-/* use the new CK_GCM_PARAMS if NSS_PKCS11_2_0_COMPAT is not defined */
+/* use the new CK_GCM_PARAMS if NSS_PKCS11_3_0_STRICT is defined */
typedef struct CK_GCM_PARAMS_V3 CK_GCM_PARAMS;
typedef CK_GCM_PARAMS_V3 CK_PTR CK_GCM_PARAMS_PTR;
#endif

View File

@ -1,31 +0,0 @@
Index: nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h
===================================================================
--- nss.orig/lib/freebl/verified/kremlin/include/kremlin/internal/types.h
+++ nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h
@@ -56,9 +56,10 @@ typedef const char *Prims_string;
!defined(__clang__)
#include <emmintrin.h>
typedef __m128i FStar_UInt128_uint128;
-#elif !defined(KRML_VERIFIED_UINT128) && !defined(_MSC_VER) && \
+#elif !defined(KRML_VERIFIED_UINT128) && !defined(_MSC_VER) && \
(defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__) || \
- (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)))
+ (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)) || \
+ defined(__s390x__))
typedef unsigned __int128 FStar_UInt128_uint128;
#elif !defined(KRML_VERIFIED_UINT128) && defined(_MSC_VER) && defined(__clang__)
typedef __uint128_t FStar_UInt128_uint128;
Index: nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h
===================================================================
--- nss.orig/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h
+++ nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h
@@ -26,7 +26,8 @@
#if !defined(KRML_VERIFIED_UINT128) && (!defined(_MSC_VER) || defined(__clang__)) && \
(defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__) || \
- (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)))
+ (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)) || \
+ defined(__s390x__))
/* GCC + using native unsigned __int128 support */

120
nss-no-dbm-man-page.patch Normal file
View File

@ -0,0 +1,120 @@
diff -up ./doc/certutil.xml.no-dbm ./doc/certutil.xml
--- ./doc/certutil.xml.no-dbm 2021-05-29 10:26:21.853386165 -0700
+++ ./doc/certutil.xml 2021-05-29 10:31:15.057058619 -0700
@@ -205,8 +205,7 @@ If this option is not used, the validity
<para><command>certutil</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para>
<para>NSS recognizes the following prefixes:</para>
<itemizedlist>
- <listitem><para><command>sql:</command> requests the newer database</para></listitem>
- <listitem><para><command>dbm:</command> requests the legacy database</para></listitem>
+ <listitem><para><command>sql:</command> requests the sql-lite database</para></listitem>
</itemizedlist>
<para>If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then <command>sql:</command> is the default.</para>
</listitem>
@@ -1205,17 +1204,9 @@ BerkeleyDB. These new databases provide
</listitem>
</itemizedlist>
-<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
+<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. </para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-
-<programlisting>$ certutil -L -d dbm:/home/my/sharednssdb</programlisting>
-
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
-
-<para>This line can be set added to the <filename>~/.bashrc</filename> file to make the change permanent.</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.</para>
<itemizedlist>
<listitem>
diff -up ./doc/modutil.xml.no-dbm ./doc/modutil.xml
--- ./doc/modutil.xml.no-dbm 2021-05-29 10:26:21.854386171 -0700
+++ ./doc/modutil.xml 2021-05-29 10:28:23.293078869 -0700
@@ -151,7 +151,7 @@
<varlistentry>
<term>-dbdir directory</term>
<listitem><para>Specify the database directory in which to access or create security module database files.</para>
- <para><command>modutil</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in SQLite format.</para></listitem>
+ <para><command>modutil</command> supports SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para></listitem>
</varlistentry>
<varlistentry>
@@ -689,15 +689,7 @@ BerkleyDB. These new databases provide m
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-
-<programlisting>modutil -create -dbdir dbm:/home/my/sharednssdb</programlisting>
-
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
-
-<para>This line can be added to the <filename>~/.bashrc</filename> file to make the change permanent for the user.</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type. </para>
<itemizedlist>
<listitem>
diff -up ./doc/pk12util.xml.no-dbm ./doc/pk12util.xml
--- ./doc/pk12util.xml.no-dbm 2021-05-29 10:26:21.854386171 -0700
+++ ./doc/pk12util.xml 2021-05-29 10:28:23.293078869 -0700
@@ -90,7 +90,7 @@
<varlistentry>
<term>-d directory</term>
<listitem><para>Specify the database directory into which to import to or export from certificates and keys.</para>
- <para><command>pk12util</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in the SQLite format.</para></listitem>
+ <para><command>pk12util</command> supports SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para></listitem>
</varlistentry>
<varlistentry>
@@ -394,15 +394,7 @@ BerkleyDB. These new databases provide m
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-
-<programlisting># pk12util -i /tmp/cert-files/users.p12 -d dbm:/home/my/sharednssdb</programlisting>
-
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
-
-<para>This line can be set added to the <filename>~/.bashrc</filename> file to make the change permanent.</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type. </para>
<itemizedlist>
<listitem>
diff -up ./doc/signver.xml.no-dbm ./doc/signver.xml
--- ./doc/signver.xml.no-dbm 2021-05-29 10:26:21.854386171 -0700
+++ ./doc/signver.xml 2021-05-29 10:28:23.293078869 -0700
@@ -66,7 +66,7 @@
<varlistentry>
<term>-d <emphasis>directory</emphasis></term>
<listitem><para>Specify the database directory which contains the certificates and keys.</para>
- <para><command>signver</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in the SQLite format.</para></listitem>
+ <para><command>signver</command> supports SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para></listitem>
</varlistentry>
<varlistentry>
<term>-a</term>
@@ -155,15 +155,7 @@ BerkleyDB. These new databases provide m
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type
-Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-
-<programlisting># signver -A -s <replaceable>signature</replaceable> -d dbm:/home/my/sharednssdb</programlisting>
-
-<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
-
-<para>This line can be added to the <filename>~/.bashrc</filename> file to make the change permanent for the user.</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.</para>
<itemizedlist>
<listitem>

View File

@ -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 diff --git a/cmd/signtool/util.c b/cmd/signtool/util.c
--- a/cmd/signtool/util.c --- a/cmd/signtool/util.c
+++ b/cmd/signtool/util.c +++ b/cmd/signtool/util.c
@@ -132,17 +132,20 @@ rm_dash_r(char *path) @@ -138,6 +138,12 @@ rm_dash_r(char *path)
if (!dir) {
PR_fprintf(errorFD, "Error: Unable to open directory %s.\n", path);
errorCount++;
return -1;
}
/* Recursively delete all entries in the directory */ /* Recursively delete all entries in the directory */
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) { while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
- sprintf(filename, "%s/%s", path, entry->name); sprintf(filename, "%s/%s", path, entry->name);
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) { + if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name
+) >= sizeof(filename)) {
+ errorCount++; + errorCount++;
+ PR_CloseDir(dir);
+ return -1; + return -1;
+ } + }
if (rm_dash_r(filename)) if (rm_dash_r(filename)) {
PR_CloseDir(dir);
return -1; 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 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 --- a/lib/libpkix/pkix/util/pkix_list.c
+++ b/lib/libpkix/pkix/util/pkix_list.c +++ b/lib/libpkix/pkix/util/pkix_list.c

749
nss-sql-man-page.patch Normal file
View File

@ -0,0 +1,749 @@
# HG changeset patch
# User Robert Relyea <rrelyea@redhat.com>
# 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
<listitem>
<para>Specify the database directory containing the certificate and key database files.</para>
<para><command>certutil</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). </para>
<para>NSS recognizes the following prefixes:</para>
<itemizedlist>
<listitem><para><command>sql:</command> requests the newer database</para></listitem>
<listitem><para><command>dbm:</command> requests the legacy database</para></listitem>
</itemizedlist>
- <para>If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then <command>dbm:</command> is the default.</para>
+ <para>If no prefix is specified the default type is retrieved from NSS_DEFAULT_DB_TYPE. If NSS_DEFAULT_DB_TYPE is not set then <command>sql:</command> is the default.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--dump-ext-val OID </term>
<listitem><para>For single cert, print binary DER encoding of extension OID.</para></listitem>
</varlistentry>
@@ -843,23 +843,23 @@ Comma separated list of one or more of t
<para>
secmod.db or pkcs11.txt
</para>
</listitem>
</itemizedlist>
<para>
These databases must be created before certificates or keys can be generated.
</para>
-<programlisting>certutil -N -d [sql:]directory</programlisting>
+<programlisting>certutil -N -d directory</programlisting>
<para><command>Creating a Certificate Request</command></para>
<para>
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.
</para>
-<programlisting>$ 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]</programlisting>
+<programlisting>$ 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]</programlisting>
<para>
The <option>-R</option> command options requires four arguments:
</para>
<itemizedlist>
<listitem>
<para>
<option>-k</option> to specify either the key type to generate or, when renewing a certificate, the existing key pair to use
</para>
@@ -881,27 +881,27 @@ Comma separated list of one or more of t
</listitem>
</itemizedlist>
<para>
The new certificate request can be output in ASCII format (<option>-a</option>) or can be written to a specified file (<option>-o</option>).
</para>
<para>
For example:
</para>
-<programlisting>$ 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
+<programlisting>$ 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...
</programlisting>
<para><command>Creating a Certificate</command></para>
<para>
A valid certificate must be issued by a trusted CA. This can be done by specifying a CA certificate (<option>-c</option>) that is stored in the certificate database. If a CA key pair is not available, you can create a self-signed certificate using the <option>-x</option> argument with the <option>-S</option> command option.
</para>
-<programlisting>$ 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]</programlisting>
+<programlisting>$ 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]</programlisting>
<para>
The series of numbers and <option>--ext*</option> options set certificate extensions that can be added to the certificate when it is generated by the CA. Interactive prompts will result.
</para>
<para>
For example, this creates a self-signed certificate:
</para>
<programlisting>$ certutil -S -s "CN=Example CA" -n my-ca-cert -x -t "C,C,C" -1 -2 -5 -m 3650</programlisting>
<para>
@@ -911,55 +911,55 @@ The interative prompts for key usage and
From there, new certificates can reference the self-signed certificate:
</para>
<programlisting>$ certutil -S -s "CN=My Server Cert" -n my-server-cert -c "my-ca-cert" -t ",," -1 -5 -6 -8 -m 730</programlisting>
<para><command>Generating a Certificate from a Certificate Request</command></para>
<para>
When a certificate request is created, a certificate can be generated by using the request and then referencing a certificate authority signing certificate (the <emphasis>issuer</emphasis> specified in the <option>-c</option> argument). The issuing certificate must be in the certificate database in the specified directory.
</para>
-<programlisting>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]</programlisting>
+<programlisting>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]</programlisting>
<para>
For example:
</para>
-<programlisting>$ 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</programlisting>
+<programlisting>$ 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</programlisting>
<para><command>Listing Certificates</command></para>
<para>
The <option>-L</option> command option lists all of the certificates listed in the certificate database. The path to the directory (<option>-d</option>) is required.
</para>
-<programlisting>$ certutil -L -d sql:/home/my/sharednssdb
+<programlisting>$ 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</programlisting>
<para>
Using additional arguments with <option>-L</option> can return and print the information for a single, specific certificate. For example, the <option>-n</option> argument passes the certificate name, while the <option>-a</option> argument prints the certificate in ASCII format:
</para>
<programlisting>
-$ 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-----
</programlisting>
<para>For a human-readable display</para>
-<programlisting>$ certutil -L -d sql:$HOME/nssdb -n my-ca-cert
+<programlisting>$ 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:
<para><command>Listing Keys</command></para>
<para>
Keys are the original material used to encrypt certificate data. The keys generated for certificates are stored separately, in the key database.
</para>
<para>
To list all keys in the database, use the <option>-K</option> command option and the (required) <option>-d</option> argument to give the path to the directory.
</para>
-<programlisting>$ certutil -K -d sql:$HOME/nssdb
+<programlisting>$ certutil -K -d $HOME/nssdb
certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services "
&lt; 0> rsa 455a6673bde9375c2887ec8bf8016b3f9f35861d Thawte Freemail Member's Thawte Consulting (Pty) Ltd. ID
&lt; 1> rsa 40defeeb522ade11090eacebaaf1196a172127df Example Domain Administrator Cert
&lt; 2> rsa 1d0b06f44f6c03842f7d4f4a1dc78b3bcd1b85a5 John Smith user cert</programlisting>
<para>
There are ways to narrow the keys listed in the search results:
</para>
<itemizedlist>
@@ -1052,111 +1052,111 @@ certutil: Checking token "NSS Certificat
</para>
</listitem>
</itemizedlist>
<para><command>Listing Security Modules</command></para>
<para>
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 <option>-U</option> command option lists all of the security modules listed in the <filename>secmod.db</filename> database. The path to the directory (<option>-d</option>) is required.
</para>
-<programlisting>$ certutil -U -d sql:/home/my/sharednssdb
+<programlisting>$ 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</programlisting>
<para><command>Adding Certificates to the Database</command></para>
<para>
Existing certificates or certificate requests can be added manually to the certificate database, even if they were generated elsewhere. This uses the <option>-A</option> command option.
</para>
-<programlisting>certutil -A -n certname -t trustargs -d [sql:]directory [-a] [-i input-file]</programlisting>
+<programlisting>certutil -A -n certname -t trustargs -d directory [-a] [-i input-file]</programlisting>
<para>
For example:
</para>
-<programlisting>$ certutil -A -n "CN=My SSL Certificate" -t ",," -d sql:/home/my/sharednssdb -i /home/example-certs/cert.cer</programlisting>
+<programlisting>$ certutil -A -n "CN=My SSL Certificate" -t ",," -d /home/my/sharednssdb -i /home/example-certs/cert.cer</programlisting>
<para>
A related command option, <option>-E</option>, is used specifically to add email certificates to the certificate database. The <option>-E</option> command has the same arguments as the <option>-A</option> command. The trust arguments for certificates have the format <emphasis>SSL,S/MIME,Code-signing</emphasis>, so the middle trust settings relate most to email certificates (though the others can be set). For example:
</para>
-<programlisting>$ certutil -E -n "CN=John Smith Email Cert" -t ",P," -d sql:/home/my/sharednssdb -i /home/example-certs/email.cer</programlisting>
+<programlisting>$ certutil -E -n "CN=John Smith Email Cert" -t ",P," -d /home/my/sharednssdb -i /home/example-certs/email.cer</programlisting>
<para><command>Deleting Certificates to the Database</command></para>
<para>
Certificates can be deleted from a database using the <option>-D</option> option. The only required options are to give the security database directory and to identify the certificate nickname.
</para>
-<programlisting>certutil -D -d [sql:]directory -n "nickname"</programlisting>
+<programlisting>certutil -D -d directory -n "nickname"</programlisting>
<para>
For example:
</para>
-<programlisting>$ certutil -D -d sql:/home/my/sharednssdb -n "my-ssl-cert"</programlisting>
+<programlisting>$ certutil -D -d /home/my/sharednssdb -n "my-ssl-cert"</programlisting>
<para><command>Validating Certificates</command></para>
<para>
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 <option>-V</option> command option.
</para>
-<programlisting>certutil -V -n certificate-name [-b time] [-e] [-u cert-usage] -d [sql:]directory</programlisting>
+<programlisting>certutil -V -n certificate-name [-b time] [-e] [-u cert-usage] -d directory</programlisting>
<para>
For example, to validate an email certificate:
</para>
-<programlisting>$ certutil -V -n "John Smith's Email Cert" -e -u S,R -d sql:/home/my/sharednssdb</programlisting>
+<programlisting>$ certutil -V -n "John Smith's Email Cert" -e -u S,R -d /home/my/sharednssdb</programlisting>
<para><command>Modifying Certificate Trust Settings</command></para>
<para>
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.
</para>
-<programlisting>certutil -M -n certificate-name -t trust-args -d [sql:]directory</programlisting>
+<programlisting>certutil -M -n certificate-name -t trust-args -d directory</programlisting>
<para>
For example:
</para>
-<programlisting>$ certutil -M -n "My CA Certificate" -d sql:/home/my/sharednssdb -t "CT,CT,CT"</programlisting>
+<programlisting>$ certutil -M -n "My CA Certificate" -d /home/my/sharednssdb -t "CT,CT,CT"</programlisting>
<para><command>Printing the Certificate Chain</command></para>
<para>
Certificates can be issued in <emphasis>chains</emphasis> because every certificate authority itself has a certificate; when a CA issues a certificate, it essentially stamps that certificate with its own fingerprint. The <option>-O</option> 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:
</para>
-<programlisting>$ certutil -d sql:/home/my/sharednssdb -O -n "jsmith@example.com"
+<programlisting>$ 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]</programlisting>
<para><command>Resetting a Token</command></para>
<para>
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 (<option>-h</option>) as well as any directory path. If there is no external token used, the default value is internal.
</para>
-<programlisting>certutil -T -d [sql:]directory -h token-name -0 security-officer-password</programlisting>
+<programlisting>certutil -T -d directory -h token-name -0 security-officer-password</programlisting>
<para>
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:
</para>
-<programlisting>$ certutil -T -d sql:/home/my/sharednssdb -h nethsm -0 secret</programlisting>
+<programlisting>$ certutil -T -d /home/my/sharednssdb -h nethsm -0 secret</programlisting>
<para><command>Upgrading or Merging the Security Databases</command></para>
<para>
Many networks or applications may be using older BerkeleyDB versions of the certificate database (<filename>cert8.db</filename>). Databases can be upgraded to the new SQLite version of the database (<filename>cert9.db</filename>) using the <option>--upgrade-merge</option> command option or existing databases can be merged with the new <filename>cert9.db</filename> databases using the <option>---merge</option> command.
</para>
<para>
The <option>--upgrade-merge</option> command must give information about the original database and then use the standard arguments (like <option>-d</option>) 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.
</para>
-<programlisting>certutil --upgrade-merge -d [sql:]directory [-P dbprefix] --source-dir directory --source-prefix dbprefix --upgrade-id id --upgrade-token-name name [-@ password-file]</programlisting>
+<programlisting>certutil --upgrade-merge -d directory [-P dbprefix] --source-dir directory --source-prefix dbprefix --upgrade-id id --upgrade-token-name name [-@ password-file]</programlisting>
<para>
For example:
</para>
-<programlisting>$ certutil --upgrade-merge -d sql:/home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp- --upgrade-id 1 --upgrade-token-name internal</programlisting>
+<programlisting>$ certutil --upgrade-merge -d /home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp- --upgrade-id 1 --upgrade-token-name internal</programlisting>
<para>
The <option>--merge</option> 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.
</para>
-<programlisting>certutil --merge -d [sql:]directory [-P dbprefix] --source-dir directory --source-prefix dbprefix [-@ password-file]</programlisting>
+<programlisting>certutil --merge -d directory [-P dbprefix] --source-dir directory --source-prefix dbprefix [-@ password-file]</programlisting>
<para>
For example:
</para>
-<programlisting>$ certutil --merge -d sql:/home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp-</programlisting>
+<programlisting>$ certutil --merge -d /home/my/sharednssdb --source-dir /opt/my-app/alias/ --source-prefix serverapp-</programlisting>
<para><command>Running certutil Commands from a Batch File</command></para>
<para>
A series of commands can be run sequentially from a text file with the <option>-B</option> command option. The only argument for this specifies the input file.
</para>
<programlisting>$ certutil -B -i /path/to/batch-file</programlisting>
</refsection>
@@ -1202,27 +1202,26 @@ BerkeleyDB. These new databases provide
<para>
pkcs11.txt, a listing of all of the PKCS #11 modules, contained in a new subdirectory in the security databases directory
</para>
</listitem>
</itemizedlist>
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases follow the more common legacy type.
-Using the SQLite databases must be manually specified by using the <command>sql:</command> prefix with the given security directory. For example:</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.
+Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-<programlisting>$ certutil -L -d sql:/home/my/sharednssdb</programlisting>
+<programlisting>$ certutil -L -d dbm:/home/my/sharednssdb</programlisting>
-<para>To set the shared database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>sql</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="sql"</programlisting>
+<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
+<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
<para>This line can be set added to the <filename>~/.bashrc</filename> file to make the change permanent.</para>
-<para>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:</para>
<itemizedlist>
<listitem>
<para>
https://wiki.mozilla.org/NSS_Shared_DB_Howto</para>
</listitem>
</itemizedlist>
<para>For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki:</para>
<itemizedlist>
diff --git a/doc/modutil.xml b/doc/modutil.xml
--- a/doc/modutil.xml
+++ b/doc/modutil.xml
@@ -144,24 +144,24 @@
</varlistentry>
<varlistentry>
<term>-ciphers cipher-enable-list</term>
<listitem><para>Enable specific ciphers in a module that is being added to the database. The <emphasis>cipher-enable-list</emphasis> is a colon-delimited list of cipher names. Enclose this list in quotation marks if it contains spaces.</para></listitem>
</varlistentry>
<varlistentry>
- <term>-dbdir [sql:]directory</term>
+ <term>-dbdir directory</term>
<listitem><para>Specify the database directory in which to access or create security module database files.</para>
- <para><command>modutil</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>sql:</command> is not used, then the tool assumes that the given databases are in the old format.</para></listitem>
+ <para><command>modutil</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in SQLite format.</para></listitem>
</varlistentry>
<varlistentry>
<term>--dbprefix prefix</term>
- <listitem><para>Specify the prefix used on the database files, such as <filename>my_</filename> for <filename>my_cert8.db</filename>. This option is provided as a special case. Changing the names of the certificate and key databases is not recommended.</para></listitem>
+ <listitem><para>Specify the prefix used on the database files, such as <filename>my_</filename> for <filename>my_cert9.db</filename>. This option is provided as a special case. Changing the names of the certificate and key databases is not recommended.</para></listitem>
</varlistentry>
<varlistentry>
<term>-installdir root-installation-directory</term>
<listitem><para>Specify the root installation directory relative to which files will be installed by the <option>-jar</option> option. This directory should be one below which it is appropriate to store dynamic library files, such as a server's root directory.</para></listitem>
</varlistentry>
<varlistentry>
@@ -224,23 +224,23 @@
</variablelist>
</refsection>
<refsection id="usage-and-examples">
<title>Usage and Examples</title>
<para><command>Creating Database Files</command></para>
<para>Before any operations can be performed, there must be a set of security databases available. <command>modutil</command> can be used to create these files. The only required argument is the database that where the databases will be located.</para>
-<programlisting>modutil -create -dbdir [sql:]directory</programlisting>
+<programlisting>modutil -create -dbdir directory</programlisting>
<para><command>Adding a Cryptographic Module</command></para>
<para>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 <command>modutil</command> directly or by running a JAR file and install script. For the most basic case, simply upload the library:</para>
<programlisting>modutil -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] </programlisting>
<para>For example:
-<programlisting>modutil -dbdir sql:/home/my/sharednssdb -add "Example PKCS #11 Module" -libfile "/tmp/crypto.so" -mechanisms RSA:DSA:RC2:RANDOM
+<programlisting>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.</programlisting>
</para>
<para><command>Installing a Cryptographic Module from a JAR File</command></para>
<para>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 <xref linkend="jar-install-file" />.</para>
@@ -262,17 +262,17 @@ Module "Example PKCS #11 Module" added t
}
}
Linux:6.0.0:x86 {
EquivalentPlatform { Linux:5.4.08:x86 }
}
} </programlisting>
<para>Both the install script and the required libraries must be bundled in a JAR file, which is specified with the <option>-jar</option> argument.</para>
-<programlisting>modutil -dbdir sql:/home/mt"jar-install-filey/sharednssdb -jar install.jar -installdir sql:/home/my/sharednssdb
+<programlisting>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 </pr
<para><command>Adding Module Spec</command></para>
<para>Each module has information stored in the security database about its configuration and parameters. These can be added or edited using the <option>-rawadd</option> command. For the current settings or to see the format of the module spec in the database, use the <option>-rawlist</option> option.</para>
<programlisting>modutil -rawadd modulespec</programlisting>
<para><command>Deleting a Module</command></para>
<para>A specific PKCS #11 module can be deleted from the <filename>secmod.db</filename> database:</para>
-<programlisting>modutil -delete modulename -dbdir [sql:]directory </programlisting>
+<programlisting>modutil -delete modulename -dbdir directory </programlisting>
<para><command>Displaying Module Information</command></para>
<para>The <filename>secmod.db</filename> 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. </para>
<para>To simply get a list of modules in the database, use the <option>-list</option> command.</para>
-<programlisting>modutil -list [modulename] -dbdir [sql:]directory </programlisting>
+<programlisting>modutil -list [modulename] -dbdir directory </programlisting>
<para>Listing the modules shows the module name, their status, and other associated security databases for certificates and keys. For example:</para>
-<programlisting>modutil -list -dbdir sql:/home/my/sharednssdb
+<programlisting>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
-----------------------------------------------------------</programlisting>
<para>Passing a specific module name with the <option>-list</option> 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:</para>
-<programlisting> modutil -list "NSS Internal PKCS #11 Module" -dbdir sql:/home/my/sharednssdb
+<programlisting> 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</programlisting>
<para>A related command, <option>-rawlist</option> returns information about the database configuration for the modules. (This information can be edited by loading new specs using the <option>-rawadd</option> command.)</para>
-<programlisting> modutil -rawlist -dbdir sql:/home/my/sharednssdb
+<programlisting> 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"</programlisting>
<para><command>Setting a Default Provider for Security Mechanisms</command></para>
<para>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).</para>
<programlisting>modutil -default modulename -mechanisms mechanism-list </programlisting>
<para>To set a module as the default provider for mechanisms, use the <option>-default</option> command with a colon-separated list of mechanisms. The available mechanisms depend on the module; NSS supplies almost all common mechanisms. For example:</para>
<programlisting>modutil -default "NSS Internal PKCS #11 Module" -dbdir -mechanisms RSA:DSA:RC2
@@ -398,29 +398,29 @@ Successfully changed defaults.</programl
<para>For example:</para>
<programlisting>modutil -enable "NSS Internal PKCS #11 Module" -slot "NSS Internal Cryptographic Services " -dbdir .
Slot "NSS Internal Cryptographic Services " enabled.</programlisting>
<para>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.</para>
<para><command>Enabling and Verifying FIPS Compliance</command></para>
<para>The NSS modules can have FIPS 140-2 compliance enabled or disabled using <command>modutil</command> with the <option>-fips</option> option. For example:</para>
-<programlisting>modutil -fips true -dbdir sql:/home/my/sharednssdb/
+<programlisting>modutil -fips true -dbdir /home/my/sharednssdb/
FIPS mode enabled.</programlisting>
<para>To verify that status of FIPS mode, run the <option>-chkfips</option> command with either a true or false flag (it doesn't matter which). The tool returns the current FIPS setting.</para>
-<programlisting>modutil -chkfips false -dbdir sql:/home/my/sharednssdb/
+<programlisting>modutil -chkfips false -dbdir /home/my/sharednssdb/
FIPS mode enabled.</programlisting>
<para><command>Changing the Password on a Token</command></para>
<para>Initializing or changing a token's password:</para>
<programlisting>modutil -changepw tokenname [-pwfile old-password-file] [-newpwfile new-password-file] </programlisting>
-<programlisting>modutil -dbdir sql:/home/my/sharednssdb -changepw "NSS Certificate DB"
+<programlisting>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.</programlisting>
</refsection>
@@ -684,27 +684,26 @@ BerkleyDB. These new databases provide m
<para>
pkcs11.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory
</para>
</listitem>
</itemizedlist>
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases follow the more common legacy type.
-Using the SQLite databases must be manually specified by using the <command>sql:</command> prefix with the given security directory. For example:</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type.
+Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-<programlisting>modutil -create -dbdir sql:/home/my/sharednssdb</programlisting>
+<programlisting>modutil -create -dbdir dbm:/home/my/sharednssdb</programlisting>
-<para>To set the shared database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>sql</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="sql"</programlisting>
+<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
+<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
<para>This line can be added to the <filename>~/.bashrc</filename> file to make the change permanent for the user.</para>
-<para>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:</para>
<itemizedlist>
<listitem>
<para>
https://wiki.mozilla.org/NSS_Shared_DB_Howto</para>
</listitem>
</itemizedlist>
<para>For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki:</para>
<itemizedlist>
diff --git a/doc/pk12util.xml b/doc/pk12util.xml
--- a/doc/pk12util.xml
+++ b/doc/pk12util.xml
@@ -25,17 +25,17 @@
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>pk12util</command>
<arg>-i p12File|-l p12File|-o p12File</arg>
<arg>-c keyCipher</arg>
<arg>-C certCipher</arg>
- <arg>-d [sql:]directory</arg>
+ <arg>-d directory</arg>
<arg>-h tokenname</arg>
<arg>-m | --key-len keyLength</arg>
<arg>-M hashAlg</arg>
<arg>-n certname</arg>
<arg>-P dbprefix</arg>
<arg>-r</arg>
<arg>-v</arg>
<arg>--cert-key-len certKeyLength</arg>
@@ -83,19 +83,19 @@
</varlistentry>
<varlistentry>
<term>-C certCipher</term>
<listitem><para>Specify the certiticate encryption algorithm.</para></listitem>
</varlistentry>
<varlistentry>
- <term>-d [sql:]directory</term>
+ <term>-d directory</term>
<listitem><para>Specify the database directory into which to import to or export from certificates and keys.</para>
- <para><command>pk12util</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>sql:</command> is not used, then the tool assumes that the given databases are in the old format.</para></listitem>
+ <para><command>pk12util</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in the SQLite format.</para></listitem>
</varlistentry>
<varlistentry>
<term>-h tokenname</term>
<listitem><para>Specify the name of the token to import into or export from.</para></listitem>
</varlistentry>
<varlistentry>
@@ -244,44 +244,44 @@
</refsection>
<refsection id="examples">
<title>Examples</title>
<para><command>Importing Keys and Certificates</command></para>
<para>The most basic usage of <command>pk12util</command> for importing a certificate or key is the PKCS #12 input file (<option>-i</option>) and some way to specify the security database being accessed (either <option>-d</option> for a directory or <option>-h</option> for a token).
</para>
<para>
- 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]
</para>
<para>For example:</para>
<para> </para>
- <programlisting># pk12util -i /tmp/cert-files/users.p12 -d sql:/home/my/sharednssdb
+ <programlisting># 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</programlisting>
<para><command>Exporting Keys and Certificates</command></para>
<para>Using the <command>pk12util</command> command to export certificates and keys requires both the name of the certificate to extract from the database (<option>-n</option>) 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.
</para>
- <para>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]</para>
+ <para>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]</para>
<para>For example:</para>
- <programlisting># pk12util -o certs.p12 -n Server-Cert -d sql:/home/my/sharednssdb
+ <programlisting># pk12util -o certs.p12 -n Server-Cert -d /home/my/sharednssdb
Enter password for PKCS12 file:
Re-enter password: </programlisting>
<para><command>Listing Keys and Certificates</command></para>
<para>The information in a <filename>.p12</filename> 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 <filename>.p12</filename> file.
</para>
- <para>pk12util -l p12File [-h tokenname] [-r] [-d [sql:]directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword]</para>
+ <para>pk12util -l p12File [-h tokenname] [-r] [-d directory] [-P dbprefix] [-k slotPasswordFile|-K slotPassword] [-w p12filePasswordFile|-W p12filePassword]</para>
<para>For example, this prints the default ASCII output:</para>
<programlisting># 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
<para>
pkcs11.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory
</para>
</listitem>
</itemizedlist>
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases follow the more common legacy type.
-Using the SQLite databases must be manually specified by using the <command>sql:</command> prefix with the given security directory. For example:</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type
+Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-<programlisting># pk12util -i /tmp/cert-files/users.p12 -d sql:/home/my/sharednssdb</programlisting>
+<programlisting># pk12util -i /tmp/cert-files/users.p12 -d dbm:/home/my/sharednssdb</programlisting>
-<para>To set the shared database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>sql</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="sql"</programlisting>
+<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
+<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
<para>This line can be set added to the <filename>~/.bashrc</filename> file to make the change permanent.</para>
-<para>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:</para>
<itemizedlist>
<listitem>
<para>
https://wiki.mozilla.org/NSS_Shared_DB_Howto</para>
</listitem>
</itemizedlist>
<para>For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki:</para>
<itemizedlist>
diff --git a/doc/signver.xml b/doc/signver.xml
--- a/doc/signver.xml
+++ b/doc/signver.xml
@@ -59,19 +59,19 @@
<term>-A</term>
<listitem><para>Displays all of the information in the PKCS#7 signature.</para></listitem>
</varlistentry>
<varlistentry>
<term>-V</term>
<listitem><para>Verifies the digital signature.</para></listitem>
</varlistentry>
<varlistentry>
- <term>-d [sql:]<emphasis>directory</emphasis></term>
+ <term>-d <emphasis>directory</emphasis></term>
<listitem><para>Specify the database directory which contains the certificates and keys.</para>
- <para><command>signver</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>sql:</command> is not used, then the tool assumes that the given databases are in the old format.</para></listitem>
+ <para><command>signver</command> supports two types of databases: the legacy security databases (<filename>cert8.db</filename>, <filename>key3.db</filename>, and <filename>secmod.db</filename>) and new SQLite databases (<filename>cert9.db</filename>, <filename>key4.db</filename>, and <filename>pkcs11.txt</filename>). If the prefix <command>dbm:</command> is not used, then the tool assumes that the given databases are in the SQLite format.</para></listitem>
</varlistentry>
<varlistentry>
<term>-a</term>
<listitem><para>Sets that the given signature file is in ASCII format.</para></listitem>
</varlistentry>
<varlistentry>
<term>-i <emphasis>input_file</emphasis></term>
<listitem><para>Gives the input file for the object with signed data.</para></listitem>
@@ -90,17 +90,17 @@
</varlistentry>
</variablelist>
</refsection>
<refsection id="examples">
<title>Extended Examples</title>
<refsection><title>Verifying a Signature</title>
<para>The <option>-V</option> option verifies that the signature in a given signature file is valid when used to sign the given object (from the input file).</para>
-<programlisting>signver -V -s <replaceable>signature_file</replaceable> -i <replaceable>signed_file</replaceable> -d sql:/home/my/sharednssdb
+<programlisting>signver -V -s <replaceable>signature_file</replaceable> -i <replaceable>signed_file</replaceable> -d /home/my/sharednssdb
signatureValid=yes</programlisting>
</refsection>
<refsection><title>Printing Signature Data</title>
<para>
The <option>-A</option> option prints all of the information contained in a signature file. Using the <option>-o</option> option prints the signature file information to the given output file rather than stdout.
</para>
@@ -150,27 +150,26 @@ BerkleyDB. These new databases provide m
<para>
pkcs11.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory
</para>
</listitem>
</itemizedlist>
<para>Because the SQLite databases are designed to be shared, these are the <emphasis>shared</emphasis> database type. The shared database type is preferred; the legacy format is included for backward compatibility.</para>
-<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases follow the more common legacy type.
-Using the SQLite databases must be manually specified by using the <command>sql:</command> prefix with the given security directory. For example:</para>
+<para>By default, the tools (<command>certutil</command>, <command>pk12util</command>, <command>modutil</command>) assume that the given security databases use the SQLite type
+Using the legacy databases must be manually specified by using the <command>dbm:</command> prefix with the given security directory. For example:</para>
-<programlisting># signver -A -s <replaceable>signature</replaceable> -d sql:/home/my/sharednssdb</programlisting>
+<programlisting># signver -A -s <replaceable>signature</replaceable> -d dbm:/home/my/sharednssdb</programlisting>
-<para>To set the shared database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>sql</envar>:</para>
-<programlisting>export NSS_DEFAULT_DB_TYPE="sql"</programlisting>
+<para>To set the legacy database type as the default type for the tools, set the <envar>NSS_DEFAULT_DB_TYPE</envar> environment variable to <envar>dbm</envar>:</para>
+<programlisting>export NSS_DEFAULT_DB_TYPE="dbm"</programlisting>
<para>This line can be added to the <filename>~/.bashrc</filename> file to make the change permanent for the user.</para>
-<para>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:</para>
<itemizedlist>
<listitem>
<para>
https://wiki.mozilla.org/NSS_Shared_DB_Howto</para>
</listitem>
</itemizedlist>
<para>For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki:</para>
<itemizedlist>

477
nss.spec
View File

@ -1,13 +1,28 @@
%global nspr_version 4.25.0 %global nspr_version 4.35.0
%global nss_version 3.52.0 %global nss_version 3.85.0
# NOTE: To avoid NVR clashes of nspr* packages:
# - reset %%{nspr_release} to 1, when updating %%{nspr_version}
# - increment %%{nspr_version}, when updating the NSS part only
%global baserelease 1
%global nss_release %baserelease
# use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when
# release number between nss and nspr are different.
%global nspr_release %[%baserelease+1]
# only need to update this as we added new
# algorithms under nss policy control
%global crypto_policies_version 20210118
%global unsupported_tools_directory %{_libdir}/nss/unsupported-tools %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools
%global saved_files_dir %{_libdir}/nss/saved %global saved_files_dir %{_libdir}/nss/saved
%global dracutlibdir %{_prefix}/lib/dracut %global dracutlibdir %{_prefix}/lib/dracut
%global dracut_modules_dir %{dracutlibdir}/modules.d/05nss-softokn/ %global dracut_modules_dir %{dracutlibdir}/modules.d/05nss-softokn/
%global dracut_conf_dir %{dracutlibdir}/dracut.conf.d %global dracut_conf_dir %{dracutlibdir}/dracut.conf.d
%ifnarch riscv64
%bcond_without tests %bcond_without tests
%bcond_without dbm %else
%bcond_with tests
%endif
%bcond_with dbm
# Produce .chk files for the final stripped binaries # Produce .chk files for the final stripped binaries
# #
@ -31,6 +46,11 @@
# The upstream omits the trailing ".0", while we need it for # The upstream omits the trailing ".0", while we need it for
# consistency with the pkg-config version: # consistency with the pkg-config version:
# https://bugzilla.redhat.com/show_bug.cgi?id=1578106 # https://bugzilla.redhat.com/show_bug.cgi?id=1578106
%{lua:
rpm.define(string.format("nspr_archive_version %s",
string.gsub(rpm.expand("%nspr_version"), "(.*)%.0$", "%1")))
}
%{lua: %{lua:
rpm.define(string.format("nss_archive_version %s", rpm.define(string.format("nss_archive_version %s",
string.gsub(rpm.expand("%nss_version"), "(.*)%.0$", "%1"))) string.gsub(rpm.expand("%nss_version"), "(.*)%.0$", "%1")))
@ -44,7 +64,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM",
Summary: Network Security Services Summary: Network Security Services
Name: nss Name: nss
Version: %{nss_version} Version: %{nss_version}
Release: 2%{?dist} Release: %{nss_release}.0.riscv64%{?dist}
License: MPLv2.0 License: MPLv2.0
URL: http://www.mozilla.org/projects/security/pki/nss/ URL: http://www.mozilla.org/projects/security/pki/nss/
Requires: nspr >= %{nspr_version} Requires: nspr >= %{nspr_version}
@ -53,9 +73,10 @@ Requires: nss-util >= %{nss_version}
Requires: nss-softokn%{_isa} >= %{nss_version} Requires: nss-softokn%{_isa} >= %{nss_version}
Requires: nss-system-init Requires: nss-system-init
Requires: p11-kit-trust Requires: p11-kit-trust
Requires: crypto-policies Requires: /usr/bin/update-crypto-policies
BuildRequires: nspr-devel >= %{nspr_version} Requires: crypto-policies >= %{crypto_policies_version}
# for shlibsign # for shlibsign
BuildRequires: make
BuildRequires: nss-softokn BuildRequires: nss-softokn
BuildRequires: sqlite-devel BuildRequires: sqlite-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -64,7 +85,6 @@ BuildRequires: gawk
BuildRequires: psmisc BuildRequires: psmisc
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: quilt
Source0: https://ftp.mozilla.org/pub/security/nss/releases/%{nss_release_tag}/src/%{name}-%{nss_archive_version}.tar.gz Source0: https://ftp.mozilla.org/pub/security/nss/releases/%{nss_release_tag}/src/%{name}-%{nss_archive_version}.tar.gz
Source1: nss-util.pc.in Source1: nss-util.pc.in
@ -75,9 +95,11 @@ Source6: nss-softokn-dracut-module-setup.sh
Source7: nss-softokn-dracut.conf Source7: nss-softokn-dracut.conf
Source8: nss.pc.in Source8: nss.pc.in
Source9: nss-config.in Source9: nss-config.in
%if %{with dbm}
Source10: blank-cert8.db Source10: blank-cert8.db
Source11: blank-key3.db Source11: blank-key3.db
Source12: blank-secmod.db Source12: blank-secmod.db
%endif
Source13: blank-cert9.db Source13: blank-cert9.db
Source14: blank-key4.db Source14: blank-key4.db
Source15: system-pkcs11.txt Source15: system-pkcs11.txt
@ -85,15 +107,18 @@ Source16: setup-nsssysinit.sh
Source20: nss-config.xml Source20: nss-config.xml
Source21: setup-nsssysinit.xml Source21: setup-nsssysinit.xml
Source22: pkcs11.txt.xml Source22: pkcs11.txt.xml
Source23: cert8.db.xml
Source24: cert9.db.xml Source24: cert9.db.xml
Source25: key3.db.xml
Source26: key4.db.xml Source26: key4.db.xml
%if %{with dbm}
Source23: cert8.db.xml
Source25: key3.db.xml
Source27: secmod.db.xml Source27: secmod.db.xml
%endif
Source28: nss-p11-kit.config Source28: nss-p11-kit.config
# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=617723 Source100: nspr-%{nspr_archive_version}.tar.gz
Patch2: nss-539183.patch Source101: nspr-config.xml
# This patch uses the GCC -iquote option documented at # This patch uses the GCC -iquote option documented at
# http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options # http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options
# to give the in-tree headers a higher priority over the system headers, # to give the in-tree headers a higher priority over the system headers,
@ -103,17 +128,19 @@ Patch2: nss-539183.patch
# case when starting an update with API changes or even private export # case when starting an update with API changes or even private export
# changes. # changes.
# #
# Once the buildroot aha been bootstrapped the patch may be removed # Once the buildroot has been bootstrapped the patch may be removed
# but it doesn't hurt to keep it. # but it doesn't hurt to keep it.
Patch4: iquote.patch Patch4: iquote.patch
Patch12: nss-signtool-format.patch Patch12: nss-signtool-format.patch
# https://github.com/FStarLang/kremlin/issues/166 # fedora disabled dbm by default
Patch13: nss-kremlin-ppc64le.patch Patch40: nss-no-dbm-man-page.patch
%if 0%{?fedora} < 34
%if 0%{?rhel} < 9 # upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=1774654
Patch20: nss-gcm-param-default-pkcs11v2.patch Patch50: nss-3.79-fix-client-cert-crash.patch
%endif
%endif Patch100: nspr-config-pc.patch
Patch101: nspr-gcc-atomics.patch
%description %description
Network Security Services (NSS) is a set of libraries designed to Network Security Services (NSS) is a set of libraries designed to
@ -234,16 +261,52 @@ Requires: nss-softokn-freebl-devel%{?_isa} = %{version}-%{release}
Requires: nspr-devel >= %{nspr_version} Requires: nspr-devel >= %{nspr_version}
Requires: nss-util-devel >= %{version}-%{release} Requires: nss-util-devel >= %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
BuildRequires: nspr-devel >= %{nspr_version}
%description softokn-devel %description softokn-devel
Header and library files for doing development with Network Security Services. Header and library files for doing development with Network Security Services.
%package -n nspr
Summary: Netscape Portable Runtime
Version: %{nspr_version}
Release: %{nspr_release}%{?dist}
License: MPLv2.0
URL: http://www.mozilla.org/projects/nspr/
Conflicts: filesystem < 3
BuildRequires: gcc
%description -n nspr
NSPR provides platform independence for non-GUI operating system
facilities. These facilities include threads, thread synchronization,
normal file and network I/O, interval timing and calendar time, basic
memory management (malloc and free) and shared library linking.
%package -n nspr-devel
Summary: Development libraries for the Netscape Portable Runtime
Version: %{nspr_version}
Release: %{nspr_release}%{?dist}
Requires: nspr%{?_isa} = %{nspr_version}-%{nspr_release}%{?dist}
Requires: pkgconfig
BuildRequires: xmlto
Conflicts: filesystem < 3
%description -n nspr-devel
Header files for doing development with the Netscape Portable Runtime.
%prep %prep
%autosetup -N -S quilt -n %{name}-%{nss_archive_version} %setup -q -T -b 100 -n nspr-%{nspr_archive_version}
%setup -q -T -b 0 -n %{name}-%{nss_archive_version}
mv ../nspr-%{nspr_archive_version}/nspr .
cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in
%patch100 -p0 -b .flags
pushd nspr
%patch101 -p1 -b .gcc-atomics
popd
pushd nss pushd nss
%autopatch -p1 %autopatch -p1 -M 99
popd popd
# https://bugzilla.redhat.com/show_bug.cgi?id=1247353 # https://bugzilla.redhat.com/show_bug.cgi?id=1247353
@ -251,14 +314,58 @@ find nss/lib/libpkix -perm /u+x -type f -exec chmod -x {} \;
%build %build
# Build, check, and install NSPR for building NSS in the later phase
#
# TODO: This phase can be done by the NSS build process if we switch
# to using "make nss_build_all". For now, however, we need some
# adjustment in the NSS build process.
mkdir -p nspr_build
pushd nspr_build
../nspr/configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--includedir=%{_includedir}/nspr4 \
--with-dist-prefix=$PWD/../dist \
%ifnarch noarch
%if 0%{__isa_bits} == 64
--enable-64bit \
%endif
%endif
%ifarch armv7l armv7hl armv7nhl
--enable-thumb2 \
%endif
--enable-optimize="$RPM_OPT_FLAGS" \
--disable-debug
export FREEBL_NO_DEPEND=1 # The assembly files are only for legacy atomics, to which we prefer GCC atomics
%ifarch i686 x86_64
sed -i '/^PR_MD_ASFILES/d' config/autoconf.mk
%endif
make
date +"%e %B %Y" | tr -d '\n' > date.xml
echo -n %{nspr_version} > version.xml
for m in %{SOURCE101}; do
cp ${m} .
done
for m in nspr-config.xml; do
xmlto man ${m}
done
popd
# Build NSS
#
# This package fails its testsuite with LTO. Disable LTO for now
#%global _lto_cflags %{nil}
#export FREEBL_NO_DEPEND=1
# Must export FREEBL_LOWHASH=1 for nsslowhash.h so that it gets # Must export FREEBL_LOWHASH=1 for nsslowhash.h so that it gets
# copied to dist and the rpm install phase can find it # copied to dist and the rpm install phase can find it
# This due of the upstream changes to fix # This due of the upstream changes to fix
# https://bugzilla.mozilla.org/show_bug.cgi?id=717906 # https://bugzilla.mozilla.org/show_bug.cgi?id=717906
export FREEBL_LOWHASH=1 # export FREEBL_LOWHASH=1
# uncomment if the iquote patch is activated # uncomment if the iquote patch is activated
export IN_TREE_FREEBL_HEADERS_FIRST=1 export IN_TREE_FREEBL_HEADERS_FIRST=1
@ -281,6 +388,9 @@ export XCFLAGS=$RPM_OPT_FLAGS
export XCFLAGS="$XCFLAGS -Wno-error=maybe-uninitialized" export XCFLAGS="$XCFLAGS -Wno-error=maybe-uninitialized"
%endif %endif
# Similarly, but for gcc-11
export XCFLAGS="$XCFLAGS -Wno-array-parameter"
export LDFLAGS=$RPM_LD_FLAGS export LDFLAGS=$RPM_LD_FLAGS
export DSO_LDOPTS=$RPM_LD_FLAGS export DSO_LDOPTS=$RPM_LD_FLAGS
@ -288,13 +398,15 @@ export DSO_LDOPTS=$RPM_LD_FLAGS
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
export NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'` export NSPR_INCLUDE_DIR=$PWD/dist/include/nspr
export NSPR_LIB_DIR=%{_libdir} export NSPR_LIB_DIR=$PWD/dist/lib
export NSS_USE_SYSTEM_SQLITE=1 export NSS_USE_SYSTEM_SQLITE=1
export NSS_ALLOW_SSLKEYLOGFILE=1 export NSS_ALLOW_SSLKEYLOGFILE=1
export NSS_SEED_ONLY_DEV_URANDOM=1
%if %{with dbm} %if %{with dbm}
%else %else
export NSS_DISABLE_DBM=1 export NSS_DISABLE_DBM=1
@ -306,16 +418,15 @@ export USE_64=1
%endif %endif
%endif %endif
%{__make} -C ./nss/coreconf
%{__make} -C ./nss/lib/dbm
# Set the policy file location # Set the policy file location
# if set NSS will always check for the policy file and load if it exists # if set NSS will always check for the policy file and load if it exists
export POLICY_FILE="nss.config" export POLICY_FILE="nss.config"
# location of the policy file # location of the policy file
export POLICY_PATH="/etc/crypto-policies/back-ends" export POLICY_PATH="/etc/crypto-policies/back-ends"
%{__make} -C ./nss
%{__make} -C ./nss all
%{__make} -C ./nss latest
# build the man pages clean # build the man pages clean
pushd ./nss pushd ./nss
@ -334,7 +445,7 @@ cat %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \
-e "s,%%exec_prefix%%,%{_prefix},g" \ -e "s,%%exec_prefix%%,%{_prefix},g" \
-e "s,%%includedir%%,%{_includedir}/nss3,g" \ -e "s,%%includedir%%,%{_includedir}/nss3,g" \
-e "s,%%NSPR_VERSION%%,%{nspr_version},g" \ -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
-e "s,%%NSSUTIL_VERSION%%,%{version},g" > \ -e "s,%%NSSUTIL_VERSION%%,%{nss_version},g" > \
./dist/pkgconfig/nss-util.pc ./dist/pkgconfig/nss-util.pc
NSSUTIL_VMAJOR=`cat nss/lib/util/nssutil.h | grep "#define.*NSSUTIL_VMAJOR" | awk '{print $3}'` NSSUTIL_VMAJOR=`cat nss/lib/util/nssutil.h | grep "#define.*NSSUTIL_VMAJOR" | awk '{print $3}'`
@ -358,7 +469,7 @@ cat %{SOURCE3} | sed -e "s,%%libdir%%,%{_libdir},g" \
-e "s,%%includedir%%,%{_includedir}/nss3,g" \ -e "s,%%includedir%%,%{_includedir}/nss3,g" \
-e "s,%%NSPR_VERSION%%,%{nspr_version},g" \ -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
-e "s,%%NSSUTIL_VERSION%%,%{nss_version},g" \ -e "s,%%NSSUTIL_VERSION%%,%{nss_version},g" \
-e "s,%%SOFTOKEN_VERSION%%,%{version},g" > \ -e "s,%%SOFTOKEN_VERSION%%,%{nss_version},g" > \
./dist/pkgconfig/nss-softokn.pc ./dist/pkgconfig/nss-softokn.pc
SOFTOKEN_VMAJOR=`cat nss/lib/softoken/softkver.h | grep "#define.*SOFTOKEN_VMAJOR" | awk '{print $3}'` SOFTOKEN_VMAJOR=`cat nss/lib/softoken/softkver.h | grep "#define.*SOFTOKEN_VMAJOR" | awk '{print $3}'`
@ -380,7 +491,7 @@ cat %{SOURCE8} | sed -e "s,%%libdir%%,%{_libdir},g" \
-e "s,%%prefix%%,%{_prefix},g" \ -e "s,%%prefix%%,%{_prefix},g" \
-e "s,%%exec_prefix%%,%{_prefix},g" \ -e "s,%%exec_prefix%%,%{_prefix},g" \
-e "s,%%includedir%%,%{_includedir}/nss3,g" \ -e "s,%%includedir%%,%{_includedir}/nss3,g" \
-e "s,%%NSS_VERSION%%,%{version},g" \ -e "s,%%NSS_VERSION%%,%{nss_version},g" \
-e "s,%%NSPR_VERSION%%,%{nspr_version},g" \ -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
-e "s,%%NSSUTIL_VERSION%%,%{nss_version},g" \ -e "s,%%NSSUTIL_VERSION%%,%{nss_version},g" \
-e "s,%%SOFTOKEN_VERSION%%,%{nss_version},g" > \ -e "s,%%SOFTOKEN_VERSION%%,%{nss_version},g" > \
@ -407,32 +518,47 @@ chmod 755 ./dist/pkgconfig/setup-nsssysinit.sh
cp ./nss/lib/ckfw/nssck.api ./dist/private/nss/ cp ./nss/lib/ckfw/nssck.api ./dist/private/nss/
date +"%e %B %Y" | tr -d '\n' > date.xml date +"%e %B %Y" | tr -d '\n' > date.xml
echo -n %{version} > version.xml echo -n %{nss_version} > version.xml
# configuration files and setup script # configuration files and setup script
for m in %{SOURCE20} %{SOURCE21} %{SOURCE22}; do %if %{with dbm}
%global XMLSOURCES %{SOURCE23} %{SOURCE24} %{SOURCE25} %{SOURCE26} %{SOURCE27}
%global dbfiles cert8.db key3.db secmod.db cert9.db key4.db pkcs11.txt
%else
%global XMLSOURCES %{SOURCE22} %{SOURCE24} %{SOURCE26}
%global dbfiles cert9.db key4.db pkcs11.txt
%endif
for m in %{SOURCE20} %{SOURCE21} %{XMLSOURCES}; do
cp ${m} . cp ${m} .
done done
for m in nss-config.xml setup-nsssysinit.xml pkcs11.txt.xml; do %global configFiles nss-config setup-nsssysinit
xmlto man ${m} for m in %{configFiles} %{dbfiles}; do
done xmlto man ${m}.xml
# nss databases considered to be configuration files
for m in %{SOURCE23} %{SOURCE24} %{SOURCE25} %{SOURCE26} %{SOURCE27}; do
cp ${m} .
done
for m in cert8.db.xml cert9.db.xml key3.db.xml key4.db.xml secmod.db.xml; do
xmlto man ${m}
done done
%check %check
%if %{with tests}
pushd nspr_build
# Run test suite.
perl ../nspr/pr/tests/runtests.pl 2>&1 | tee output.log
TEST_FAILURES=`grep -c FAILED ./output.log` || :
if [ $TEST_FAILURES -ne 0 ]; then
echo "error: test suite returned failure(s)"
exit 1
fi
echo "test suite completed"
popd
%endif
%if %{with tests} %if %{with tests}
# Begin -- copied from the build section # Begin -- copied from the build section
export FREEBL_NO_DEPEND=1 export FREEBL_NO_DEPEND=1
export BUILD_OPT=1 export BUILD_OPT=1
export NSS_DISABLE_PPC_GHASH=1
%ifnarch noarch %ifnarch noarch
%if 0%{__isa_bits} == 64 %if 0%{__isa_bits} == 64
@ -442,6 +568,15 @@ export USE_64=1
# End -- copied from the build section # End -- copied from the build section
# copy the nspr libraries into the NSS object directory so we use the
# newly compiled nspr binaries in our test rather than the build root
# versions
export LOBJDIR=`make -s -C ./nss/tests/common objdir_name`
for i in ./dist/lib/*.so
do
cp $i ./dist/${LOBJDIR}/lib
done
# This is necessary because the test suite tests algorithms that are # This is necessary because the test suite tests algorithms that are
# disabled by the system policy. # disabled by the system policy.
export NSS_IGNORE_SYSTEM_POLICY=1 export NSS_IGNORE_SYSTEM_POLICY=1
@ -465,9 +600,9 @@ if [ $SPACEISBAD -ne 0 ]; then
echo "error: filenames containing space are not supported (xargs)" echo "error: filenames containing space are not supported (xargs)"
exit 1 exit 1
fi fi
MYRAND=`perl -e 'print 9000 + int rand 1000'`; echo $MYRAND ||: export MYRAND=`perl -e 'print 9000 + int rand 1000'`; echo $MYRAND
RANDSERV=selfserv_${MYRAND}; echo $RANDSERV ||: export RANDSERV=selfserv_${MYRAND}; echo $RANDSERV
DISTBINDIR=`ls -d ./dist/*.OBJ/bin`; echo $DISTBINDIR ||: export DISTBINDIR=./dist/${LOBJDIR}/bin
pushd "$DISTBINDIR" pushd "$DISTBINDIR"
ln -s selfserv $RANDSERV ln -s selfserv $RANDSERV
popd popd
@ -505,6 +640,46 @@ killall $RANDSERV || :
%install %install
pushd nspr_build
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
# Get rid of the things we don't want installed (per upstream)
rm -rf \
$RPM_BUILD_ROOT/%{_bindir}/compile-et.pl \
$RPM_BUILD_ROOT/%{_bindir}/prerr.properties \
$RPM_BUILD_ROOT/%{_libdir}/libnspr4.a \
$RPM_BUILD_ROOT/%{_libdir}/libplc4.a \
$RPM_BUILD_ROOT/%{_libdir}/libplds4.a \
$RPM_BUILD_ROOT/%{_datadir}/aclocal/nspr.m4 \
$RPM_BUILD_ROOT/%{_includedir}/nspr4/md
for f in nspr-config; do
install -c -m 644 ${f}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${f}.1
done
popd
# Begin -- copied from the build section
# this is needed to make sure LOBJDIR is correct
export FREEBL_NO_DEPEND=1
export BUILD_OPT=1
export NSS_DISABLE_PPC_GHASH=1
%ifnarch noarch
%if 0%{__isa_bits} == 64
export USE_64=1
%endif
%endif
# End -- copied from the build section
# get the objdir value from the test make file
export LOBJDIR=`make -s -C ./nss/tests/common objdir_name`
# There is no make install target so we'll do it ourselves. # There is no make install target so we'll do it ourselves.
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/nss3 mkdir -p $RPM_BUILD_ROOT/%{_includedir}/nss3
@ -533,15 +708,17 @@ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
# Copy the binary libraries we want # Copy the binary libraries we want
for file in libnssutil3.so libsoftokn3.so %{?with_dbm:libnssdbm3.so} libfreebl3.so libfreeblpriv3.so libnss3.so libnsssysinit.so libsmime3.so libssl3.so for file in libnssutil3.so libsoftokn3.so %{?with_dbm:libnssdbm3.so} libfreebl3.so libfreeblpriv3.so libnss3.so libnsssysinit.so libsmime3.so libssl3.so
do do
install -p -m 755 dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} install -p -m 755 dist/${LOBJDIR}/lib/$file $RPM_BUILD_ROOT/%{_libdir}
done done
# Install the empty NSS db files # Install the empty NSS db files
# Legacy db # Legacy db
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb
%if %{with dbm}
install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/cert8.db install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/cert8.db
install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/key3.db install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/key3.db
install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/secmod.db install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/secmod.db
%endif
# Shared db # Shared db
install -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/cert9.db install -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/cert9.db
install -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/key4.db install -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/key4.db
@ -550,19 +727,19 @@ install -p -m 644 %{SOURCE15} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/pkcs11.tx
# Copy the development libraries we want # Copy the development libraries we want
for file in libcrmf.a libnssb.a libnssckfw.a for file in libcrmf.a libnssb.a libnssckfw.a
do do
install -p -m 644 dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} install -p -m 644 dist/${LOBJDIR}/lib/$file $RPM_BUILD_ROOT/%{_libdir}
done done
# Copy the binaries we want # Copy the binaries we want
for file in certutil cmsutil crlutil modutil nss-policy-check pk12util signver ssltap for file in certutil cmsutil crlutil modutil nss-policy-check pk12util signver ssltap
do do
install -p -m 755 dist/*.OBJ/bin/$file $RPM_BUILD_ROOT/%{_bindir} install -p -m 755 dist/${LOBJDIR}/bin/$file $RPM_BUILD_ROOT/%{_bindir}
done done
# Copy the binaries we ship as unsupported # Copy the binaries we ship as unsupported
for file in bltest ecperf fbectest fipstest shlibsign atob btoa derdump listsuites ocspclnt pp selfserv signtool strsclnt symkeyutil tstclnt vfyserv vfychain for file in bltest ecperf fbectest fipstest shlibsign atob btoa derdump listsuites ocspclnt pp selfserv signtool strsclnt symkeyutil tstclnt vfyserv vfychain
do do
install -p -m 755 dist/*.OBJ/bin/$file $RPM_BUILD_ROOT/%{unsupported_tools_directory} install -p -m 755 dist/${LOBJDIR}/bin/$file $RPM_BUILD_ROOT/%{unsupported_tools_directory}
done done
# Copy the include files we want # Copy the include files we want
@ -580,7 +757,7 @@ done
# Copy the static freebl library # Copy the static freebl library
for file in libfreebl.a for file in libfreebl.a
do do
install -p -m 644 dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} install -p -m 644 dist/${LOBJDIR}/lib/$file $RPM_BUILD_ROOT/%{_libdir}
done done
# Copy the template files we want # Copy the template files we want
@ -603,7 +780,7 @@ install -p -m 755 ./dist/pkgconfig/setup-nsssysinit.sh $RPM_BUILD_ROOT/%{_bindir
ln -r -s -f $RPM_BUILD_ROOT/%{_bindir}/setup-nsssysinit.sh $RPM_BUILD_ROOT/%{_bindir}/setup-nsssysinit ln -r -s -f $RPM_BUILD_ROOT/%{_bindir}/setup-nsssysinit.sh $RPM_BUILD_ROOT/%{_bindir}/setup-nsssysinit
# Copy the man pages for scripts # Copy the man pages for scripts
for f in nss-config setup-nsssysinit; do for f in %{configFiles}; do
install -c -m 644 ${f}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${f}.1 install -c -m 644 ${f}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${f}.1
done done
# Copy the man pages for the nss tools # Copy the man pages for the nss tools
@ -616,12 +793,8 @@ install -c -m 644 ./dist/docs/nroff/pp.1 $RPM_BUILD_ROOT%{_mandir}/man1/pp.1
install -c -m 644 ./dist/docs/nroff/pp.1 $RPM_BUILD_ROOT%{_datadir}/doc/nss-tools/pp.1 install -c -m 644 ./dist/docs/nroff/pp.1 $RPM_BUILD_ROOT%{_datadir}/doc/nss-tools/pp.1
%endif %endif
# Copy the man pages for the configuration files
for f in pkcs11.txt; do
install -c -m 644 ${f}.5 $RPM_BUILD_ROOT%{_mandir}/man5/${f}.5
done
# Copy the man pages for the nss databases # Copy the man pages for the nss databases
for f in cert8.db cert9.db key3.db key4.db secmod.db; do for f in %{dbfiles}; do
install -c -m 644 ${f}.5 $RPM_BUILD_ROOT%{_mandir}/man5/${f}.5 install -c -m 644 ${f}.5 $RPM_BUILD_ROOT%{_mandir}/man5/${f}.5
done done
@ -634,9 +807,20 @@ install -p -m 644 %{SOURCE28} $RPM_BUILD_ROOT/%{_sysconfdir}/crypto-policies/loc
/usr/bin/setup-nsssysinit.sh on /usr/bin/setup-nsssysinit.sh on
%post %post
update-crypto-policies &> /dev/null || : %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
%postun %posttrans
update-crypto-policies &> /dev/null || : update-crypto-policies &> /dev/null || :
@ -647,16 +831,20 @@ update-crypto-policies &> /dev/null || :
%{_libdir}/libssl3.so %{_libdir}/libssl3.so
%{_libdir}/libsmime3.so %{_libdir}/libsmime3.so
%dir %{_sysconfdir}/pki/nssdb %dir %{_sysconfdir}/pki/nssdb
%if %{with dbm}
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/cert8.db %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/cert8.db
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/key3.db %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/key3.db
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/secmod.db %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/secmod.db
%endif
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/cert9.db %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/cert9.db
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/key4.db %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/key4.db
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/pkcs11.txt %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/pkcs11.txt
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/crypto-policies/local.d/nss-p11-kit.config %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/crypto-policies/local.d/nss-p11-kit.config
%if %{with dbm}
%doc %{_mandir}/man5/cert8.db.5* %doc %{_mandir}/man5/cert8.db.5*
%doc %{_mandir}/man5/key3.db.5* %doc %{_mandir}/man5/key3.db.5*
%doc %{_mandir}/man5/secmod.db.5* %doc %{_mandir}/man5/secmod.db.5*
%endif
%doc %{_mandir}/man5/cert9.db.5* %doc %{_mandir}/man5/cert9.db.5*
%doc %{_mandir}/man5/key4.db.5* %doc %{_mandir}/man5/key4.db.5*
%doc %{_mandir}/man5/pkcs11.txt.5* %doc %{_mandir}/man5/pkcs11.txt.5*
@ -746,6 +934,7 @@ update-crypto-policies &> /dev/null || :
%{_includedir}/nss3/p12plcy.h %{_includedir}/nss3/p12plcy.h
%{_includedir}/nss3/p12t.h %{_includedir}/nss3/p12t.h
%{_includedir}/nss3/pk11func.h %{_includedir}/nss3/pk11func.h
%{_includedir}/nss3/pk11hpke.h
%{_includedir}/nss3/pk11pqg.h %{_includedir}/nss3/pk11pqg.h
%{_includedir}/nss3/pk11priv.h %{_includedir}/nss3/pk11priv.h
%{_includedir}/nss3/pk11pub.h %{_includedir}/nss3/pk11pub.h
@ -890,8 +1079,174 @@ update-crypto-policies &> /dev/null || :
%{_includedir}/nss3/nsslowhash.h %{_includedir}/nss3/nsslowhash.h
%{_includedir}/nss3/shsign.h %{_includedir}/nss3/shsign.h
%files -n nspr
%{!?_licensedir:%global license %%doc}
%license nspr/LICENSE
%{_libdir}/libnspr4.so
%{_libdir}/libplc4.so
%{_libdir}/libplds4.so
%files -n nspr-devel
%{_includedir}/nspr4
%{_libdir}/pkgconfig/nspr.pc
%{_bindir}/nspr-config
%{_mandir}/man*/*
%changelog %changelog
* Fri Nov 26 2022 David Abdurachmanov <davidlt@rivosinc.com> - 3.85.0-1.0.riscv64
- Disable tests on riscv64
* Thu Nov 17 2022 Bob Relyea <rrelyea@redhat.com> - 3.85.0-1
- update to NSS 3.85
* Tue Sep 20 2022 Bob Relyea <rrelyea@redhat.com> - 3.83.0-1
- update to NSS 3.83
- update to NSPR 4.35
* Thu Jun 21 2022 Bob Relyea <rrelyea@redhat.com> - 3.81.0-1
- udpate to NSS 3.81
* Thu Jun 16 2022 Bob Relyea <rrelyea@redhat.com> - 3.79.0-2
- Fix crash when getting client cert and there is none in the database.
* Tue May 31 2022 Bob Relyea <rrelyea@redhat.com> - 3.79.0-1
- Update to NSS 3.79
- Update to NSPR 4.34
* Mon Apr 4 2022 Bob Relyea <rrelyea@redhat.com> - 3.77.0-1
- Update to 3.77
* Fri Feb 4 2022 Bob Relyea <rrelyea@redhat.com> - 3.75.0-1
- Update to 3.75
- fix PayPal expiration issue
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.73.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Dec 1 2021 Bob Relyea <rrelyea@redhat.com> - 3.73.0-1
- Update to 3.73
- includes CVE 2021-43527
* Mon Oct 4 2021 Bob Relyea <rrelyea@redhat.com> - 3.71.0-1
- Update to 3.71
* Tue Aug 10 2021 Bob Relyea <rrelyea@redhat.com> - 3.69.0-2
- turn on lto
* Tue Aug 10 2021 Bob Relyea <rrelyea@redhat.com> - 3.69.0-1
- Update to 3.69
- Update to NSPR 4.31
* Tue Jul 27 2021 Bob Relyea <rrelyea@redhat.com> - 3.67.0-4
- switch to baserelease so rpmdev-bumpspec will work next time
* Tue Jul 27 2021 Bob Relyea <rrelyea@redhat.com> - 3.67.0-3
- rpmdev-bumpspec doesn't work correctly with nss/nspr. Fixup version numbers
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.67.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Mar 23 2021 Bob Relyea <rrelyea@redhat.com> - 3.67.0-1
- Update to 3.67
- Update to NSPR 2.31
* Tue Mar 23 2021 Bob Relyea <rrelyea@redhat.com> - 3.65.0-1
- Update to 3.65
- update nss-tools manages to remove references to dbm
* Tue Mar 23 2021 Bob Relyea <rrelyea@redhat.com> - 3.63.0-1
- Update to 3.63
- Update to NSPR 2.30
- Remove old dbm files and man pages
* Tue Feb 23 2021 Bob Relyea <rrelyea@redhat.com> - 3.62.0-1
- Update to 3.62
* Mon Feb 01 2021 Kalev Lember <klember@redhat.com> - 3.60.1-5
- Rebuild to fix broken nspr dependencies
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.60.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 22 2021 Bob Relyea <rrelyea@redhat.com> - 3.60.1-2
- Update nspr release number
* Fri Jan 22 2021 Bob Relyea <rrelyea@redhat.com> - 3.60.1-2
- Update requires so that we get the correct crypto policies
(or all RSA and ECDSA signatures wil fail)
* Thu Jan 21 2021 Bob Relyea <rrelyea@redhat.com> - 3.60.1-1
- Update to NSS 3.60.1
- Drop NODEPEND_FREEBL and LOWHASH
* Fri Dec 11 2020 Bob Relyea <rrelyea@redhat.com> - 3.59.0-2
- Work around btrfs/sqlite bug
- Disable new policy entries until crypto-polices has been updated
* Thu Dec 10 2020 Daiki Ueno <dueno@redhat.com> - 3.59.0-1
- Update to NSS 3.59
- Remove unused quilt BR
* Sat Nov 7 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-8
- Replace %%{version} references in %%build with %%{nss_version}, suggested by Dmitry Butskoy in bz#1895447
* Fri Oct 30 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-7
- Use the lockstep release numbering for both nspr and nss
* Thu Oct 29 2020 Jeff Law <law@redhat.com> - 3.58.0-6
- Disable -Warray-parameter warning for gcc-11
* Tue Oct 27 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-5
- Consolidate NSPR package with this package
* Mon Oct 26 2020 Bob Relyea <rrelyea@redhat.com> - 3.58.0-4
- fix pkix ocsp to tolerate OCSP checking on intermediates
when the root is signed by sha1 and sha1 is disabled by
policy
* Mon Oct 26 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-3
- Revert the last change, always tolerate the first CCS in TLS 1.3
* Thu Oct 22 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-2
- Enable TLS 1.3 middlebox compatibility mode by default
* Tue Oct 20 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-1
- Update to NSS 3.58
* Sat Sep 19 2020 Daiki Ueno <dueno@redhat.com> - 3.57.0-1
- Update to NSS 3.57
* Mon Aug 24 2020 Daiki Ueno <dueno@redhat.com> - 3.56.0-1
- Update to NSS 3.56
* Thu Aug 13 2020 Daiki Ueno <dueno@redhat.com> - 3.55.0-3
- Fix DBM backend disablement
- Add scriptlet to auto-migrated known database locations
* Sat Aug 8 2020 Daiki Ueno <dueno@redhat.com> - 3.55.0-2
- Disable LTO
* Sun Aug 2 2020 Daiki Ueno <dueno@redhat.com> - 3.55.0-1
- Update to NSS 3.55
- Disable building DBM backend
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.54.0-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.54.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 15 2020 Daiki Ueno <dueno@redhat.com> - 3.54.0-1
- Update to NSS 3.54
* Thu Jun 4 2020 Bob Relyea <rrelyea@redhat.com> - 3.53.0-2
- Fix non-strict prototype in pk11pub.h
* Mon Jun 1 2020 Daiki Ueno <dueno@redhat.com> - 3.53.0-1
- Update to NSS 3.53
* Wed May 13 2020 Bob Relyea <rrelyea@redhat.com> - 3.52.0-2 * Wed May 13 2020 Bob Relyea <rrelyea@redhat.com> - 3.52.0-2
- Delay CK_GCM_PARAMS semantics until fedora 34 - Delay CK_GCM_PARAMS semantics until fedora 34

View File

@ -1,6 +1,4 @@
SHA512 (blank-cert8.db) = ac131d15708c5f1b5e467831f919f4fc4ba13b60a4bb5fe260c845fa9afcd899a588d21ed52060abaa1bbb29f2b53af8b495d28407183cb03aff1974f95f1d3d
SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06 SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06
SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c
SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7 SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7
SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310 SHA512 (nss-3.85.tar.gz) = 97cfffa2beed1dba5d31e0c6e450553e5a8c78b427521640adb00c05d9d63cd64dc08388f0dbf96c93efb79f5daf4ba8db8d026b0b43d2e5c865a9b833fc77a1
SHA512 (nss-3.52.tar.gz) = a45baf38717bceda03c292b2c01def680a24a846327e17d36044a85e30ed40c68220c78c0a2c3025c11778ee58f5d5eb0fff1b4cd274b95c408fb59e394e62c6 SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f