Compare commits

...

30 Commits

Author SHA1 Message Date
David Abdurachmanov 722d69a69e
Disable tests on riscv64 for now
[..]
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>
2023-12-14 09:07:05 +02:00
David Abdurachmanov ee2f44baa3
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-12-14 09:05:25 +02:00
Krenzelok Frantisek 7a963c96b2 Update NSS to 3.95.0
- remove nss-3.94-fix-ec-encoding.patch (upstreamed)
2023-11-27 12:38:28 +01:00
Robert Relyea b40f26ee71 Revert didn't even build, build with the actual fix. 2023-10-25 15:23:29 -07:00
Robert Relyea 5b2f53fc24 Fix binary compatibilty issue in ECC by reverting the HACL patch. 2023-10-25 14:57:37 -07:00
Krenzelok Frantisek 78c186d68b Update NSS to 3.94.0 2023-10-04 08:55:46 +02:00
Robert Relyea a5c303c526 Update License field to SPDX. 2023-09-11 09:48:48 -07:00
Krenzelok Frantisek d11658ac7e Update NSS to 3.93.0 2023-08-31 05:45:16 +02:00
Frantisek Krenzelok 2e20259fc5
Update NSS to 3.92.0
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-08-02 07:12:33 +02:00
Fedora Release Engineering d99edd1158 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 16:55:07 +00:00
Frantisek Krenzelok 3ba95b4e6d
Update NSS to 3.91.0
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-07-04 16:06:42 +02:00
Frantisek Krenzelok 9420b56ac3
Explicitly specify the doc files for nspr-devel
nspr-devel now contains only the nspr relevant docs instead of all
the docs.

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-06-13 12:41:41 +02:00
Frantisek Krenzelok 5ddb492599
Resolves: rhbz#2213765
by fixing the nspr_release number
2023-06-09 23:20:43 +02:00
Frantisek Krenzelok ab34898fd4
Fix changelog date 2023-06-06 21:13:13 +02:00
Frantisek Krenzelok 746cb03e25
Hotfix: previous commit 2bdda3a
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-06-06 13:56:40 +02:00
Frantisek Krenzelok 2bdda3a809
Fix: add condition for architecture specific assebly feature
Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1836781
Additional bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1836925

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-06-06 11:39:46 +02:00
Frantisek Krenzelok 493bb4aa7b
Update %patch syntax
The syntax was changed from `%patch<num>` to `%patch <num>`

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-06-05 13:48:07 +02:00
Frantisek Krenzelok c285f42bbe
Update NSS to 3.90.0
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-06-05 11:05:40 +02:00
Peter Leitmann 410a644f5b Add TMT interoperability tests 2023-05-24 17:25:21 +00:00
Frantisek Krenzelok 7f35208eca
Combine nss and nspr source togeather
Mozilla provides a package that has both utilities

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-05-05 18:41:35 +02:00
Frantisek Krenzelok 2360d75a85
Use %{nss_version} explicitly insted of %{version}
Use nss_version explicitly as version is overiden by nspr_version
durring execution of spec

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-05-05 18:11:00 +02:00
Adam Williamson 12fcec8a23 Replace dangling pointer workaround with a patch from upstream 2023-04-06 11:08:34 -07:00
Adam Williamson ed6e518933 Disable GCC dangling-pointer warning to make build work
See https://bugzilla.mozilla.org/show_bug.cgi?id=1826650 - with
very recent GCC 13, nss build fails on this warning. jschanck is
working on a fix, but his first cut didn't work and I really
want a build done so we can get a Firefox build done.
2023-04-05 15:49:23 -07:00
Frantisek Krenzelok ef1f194244 Update NSS to 3.89.0 & remove unused patch
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-04-05 10:28:49 -07:00
Frantisek Krenzelok 9a23e7f5cd
Update NSS to 3.88.1
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-02-10 16:42:33 +01:00
Bob Relyea 7983668370 Fix compile issues found during the Fedora 38 rebuild.
(SECStatus is an enum and can't be assigned to and int)
2023-01-24 14:03:27 -08:00
Fedora Release Engineering ea71f8dfa8 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:49:27 +00:00
Frantisek Krenzelok e88705bd74
Update NSS to 3.87 & remove unused patches
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
2023-01-10 21:13:44 +01:00
Bob Relyea 1c86aae278 Fix nss.spec syntax error 2022-11-17 15:45:22 -08:00
Bob Relyea faa802de5a Update NSS to 3.85 (rhbz#214318) 2022-11-17 14:49:13 -08:00
22 changed files with 219 additions and 1197 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

11
.gitignore vendored
View File

@ -75,3 +75,14 @@ TestUser51.cert
/nss-3.81.tar.gz
/nss-3.83.tar.gz
/nspr-4.35.tar.gz
/nss-3.85.tar.gz
/nss-3.87.tar.gz
/nss-3.88.1.tar.gz
/nss-3.89.tar.gz
/nss-3.89-with-nspr-4.35.tar.gz
/nss-3.90-with-nspr-4.35.tar.gz
/nss-3.91-with-nspr-4.35.tar.gz
/nss-3.92-with-nspr-4.35.tar.gz
/nss-3.93-with-nspr-4.35.tar.gz
/nss-3.94-with-nspr-4.35.tar.gz
/nss-3.95-with-nspr-4.35.tar.gz

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

View File

@ -1,39 +0,0 @@
diff -up ./lib/pk11wrap/pk11pars.c.policy_revert ./lib/pk11wrap/pk11pars.c
--- ./lib/pk11wrap/pk11pars.c.policy_revert 2020-11-04 10:26:59.085300799 -0800
+++ ./lib/pk11wrap/pk11pars.c 2020-11-04 10:29:52.774239468 -0800
@@ -391,12 +391,6 @@ static const oidValDef signOptList[] = {
/* Signatures */
{ CIPHER_NAME("DSA"), SEC_OID_ANSIX9_DSA_SIGNATURE,
NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE },
- { CIPHER_NAME("RSA-PKCS"), SEC_OID_PKCS1_RSA_ENCRYPTION,
- NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE },
- { CIPHER_NAME("RSA-PSS"), SEC_OID_PKCS1_RSA_PSS_SIGNATURE,
- NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE },
- { CIPHER_NAME("ECDSA"), SEC_OID_ANSIX962_EC_PUBLIC_KEY,
- NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_SIGNATURE },
};
typedef struct {
@@ -412,7 +406,7 @@ static const algListsDef algOptLists[] =
{ macOptList, PR_ARRAY_SIZE(macOptList), "MAC", PR_FALSE },
{ cipherOptList, PR_ARRAY_SIZE(cipherOptList), "CIPHER", PR_FALSE },
{ kxOptList, PR_ARRAY_SIZE(kxOptList), "OTHER-KX", PR_FALSE },
- { signOptList, PR_ARRAY_SIZE(signOptList), "OTHER-SIGN", PR_FALSE },
+ { signOptList, PR_ARRAY_SIZE(signOptList), "OTHER-SIGN", PR_TRUE },
};
static const optionFreeDef sslOptList[] = {
diff -up ./tests/ssl/sslpolicy.txt.policy_revert ./tests/ssl/sslpolicy.txt
--- ./tests/ssl/sslpolicy.txt.policy_revert 2020-11-04 10:31:20.837715397 -0800
+++ ./tests/ssl/sslpolicy.txt 2020-11-04 10:33:19.598357223 -0800
@@ -193,7 +193,9 @@
1 noECC SSL3 d disallow=all_allow=hmac-sha1:sha256:rsa-pkcs:rsa:des-ede3-cbc:tls-version-min=tls1.0:tls-version-max=tls1.2 Disallow Version Implicitly Narrow
1 noECC SSL3 d disallow=all_allow=md2/all:md4/all:md5/all:sha1/all:sha256/all:sha384/all:sha512/all:rsa-pkcs/all:rsa-pss/all:ecdsa/all:dsa/all:hmac-sha1/all:hmac-sha224/all:hmac-sha256/all:hmac-sha384/all:hmac-sha512/all:hmac-md5/all:camellia128-cbc/all:camellia192-cbc/all:camellia256-cbc/all:seed-cbc/all:des-ede3-cbc/all:des-40-cbc/all:des-cbc/all:null-cipher/all:rc2/all:rc4/all:idea/all:rsa/all:rsa-export/all:dhe-rsa/all:dhe-dss/all:ecdhe-ecdsa/all:ecdhe-rsa/all:ecdh-ecdsa/all:ecdh-rsa/all:tls-version-min=tls1.0:tls-version-max=tls1.2 Disallow Version Implicitly
0 noECC SSL3 d disallow=dsa Disallow DSA Signatures Explicitly
- 1 noECC SSL3 d disallow=rsa-pkcs Disallow RSA PKCS 1 Signatures Explicitly
+# rsa-pkcs, rsa-pss, and ecdsa policy checking reverted in rhel8 for binary
+# compatibility reasons
+# 1 noECC SSL3 d disallow=rsa-pkcs Disallow RSA PKCS 1 Signatures Explicitly
# test default settings
# NOTE: tstclient will attempt to overide the defaults, so we detect we
# were successful by locking in our settings

View File

@ -1,19 +0,0 @@
diff -up ./lib/freebl/blinit.c.disable_hw_ppc ./lib/freebl/blinit.c
--- ./lib/freebl/blinit.c.disable_hw_ppc 2021-05-27 18:04:59.754657701 -0700
+++ ./lib/freebl/blinit.c 2021-05-27 18:07:02.756397733 -0700
@@ -502,6 +502,7 @@ CheckPPCSupport()
char *disable_hw_crypto = PR_GetEnvSecure("NSS_DISABLE_PPC_GHASH");
unsigned long hwcaps = 0;
+#ifdef notdef
#if defined(__linux__)
#if __has_include(<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

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

78
nss-3.89-dangling.patch Normal file
View File

@ -0,0 +1,78 @@
diff --git a/cmd/ecperf/ecperf.c b/cmd/ecperf/ecperf.c
--- a/cmd/ecperf/ecperf.c
+++ b/cmd/ecperf/ecperf.c
@@ -51,10 +51,11 @@
int iters = threadData->iters;
unsigned char sigData[256];
SECItem sig;
CK_SESSION_HANDLE session;
CK_RV crv;
+ void *tmp = NULL;
threadData->status = SECSuccess;
threadData->count = 0;
/* get our thread's session */
@@ -66,10 +67,11 @@
}
if (threadData->isSign) {
sig.data = sigData;
sig.len = sizeof(sigData);
+ tmp = threadData->p2;
threadData->p2 = (void *)&sig;
}
while (iters--) {
threadData->status = (*op)(session, threadData->p1,
@@ -77,27 +79,33 @@
if (threadData->status != SECSuccess) {
break;
}
threadData->count++;
}
+
+ if (threadData->isSign) {
+ threadData->p2 = tmp;
+ }
return;
}
void
genericThread(void *data)
{
ThreadData *threadData = (ThreadData *)data;
int iters = threadData->iters;
unsigned char sigData[256];
SECItem sig;
+ void *tmp = NULL;
threadData->status = SECSuccess;
threadData->count = 0;
if (threadData->isSign) {
sig.data = sigData;
sig.len = sizeof(sigData);
+ tmp = threadData->p2;
threadData->p2 = (void *)&sig;
}
while (iters--) {
threadData->status = (*threadData->op)(threadData->p1,
@@ -105,10 +113,14 @@
if (threadData->status != SECSuccess) {
break;
}
threadData->count++;
}
+
+ if (threadData->isSign) {
+ threadData->p2 = tmp;
+ }
return;
}
/* Time iter repetitions of operation op. */
SECStatus

View File

@ -1,62 +0,0 @@
--- nss/cmd/httpserv/httpserv.c.539183 2016-05-21 18:31:39.879585420 -0700
+++ nss/cmd/httpserv/httpserv.c 2016-05-21 18:37:22.374464057 -0700
@@ -953,23 +953,23 @@
getBoundListenSocket(unsigned short port)
{
PRFileDesc *listen_sock;
int listenQueueDepth = 5 + (2 * maxThreads);
PRStatus prStatus;
PRNetAddr addr;
PRSocketOptionData opt;
- addr.inet.family = PR_AF_INET;
- addr.inet.ip = PR_INADDR_ANY;
- addr.inet.port = PR_htons(port);
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
+ errExit("PR_SetNetAddr");
+ }
- listen_sock = PR_NewTCPSocket();
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
if (listen_sock == NULL) {
- errExit("PR_NewTCPSocket");
+ errExit("PR_OpenTCPSockett");
}
opt.option = PR_SockOpt_Nonblocking;
opt.value.non_blocking = PR_FALSE;
prStatus = PR_SetSocketOption(listen_sock, &opt);
if (prStatus < 0) {
PR_Close(listen_sock);
errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)");
--- nss/cmd/selfserv/selfserv.c.539183 2016-05-21 18:31:39.882585367 -0700
+++ nss/cmd/selfserv/selfserv.c 2016-05-21 18:41:43.092801174 -0700
@@ -1711,23 +1711,23 @@
getBoundListenSocket(unsigned short port)
{
PRFileDesc *listen_sock;
int listenQueueDepth = 5 + (2 * maxThreads);
PRStatus prStatus;
PRNetAddr addr;
PRSocketOptionData opt;
- addr.inet.family = PR_AF_INET;
- addr.inet.ip = PR_INADDR_ANY;
- addr.inet.port = PR_htons(port);
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
+ errExit("PR_SetNetAddr");
+ }
- listen_sock = PR_NewTCPSocket();
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
if (listen_sock == NULL) {
- errExit("PR_NewTCPSocket");
+ errExit("PR_OpenTCPSocket error");
}
opt.option = PR_SockOpt_Nonblocking;
opt.value.non_blocking = PR_FALSE;
prStatus = PR_SetSocketOption(listen_sock, &opt);
if (prStatus < 0) {
PR_Close(listen_sock);
errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)");

View File

@ -1,18 +0,0 @@
diff -up ./lib/softoken/sdb.c.orig ./lib/softoken/sdb.c
--- ./lib/softoken/sdb.c.orig 2020-12-11 22:49:26.961726193 -0500
+++ ./lib/softoken/sdb.c 2020-12-11 23:01:30.739122494 -0500
@@ -690,8 +690,14 @@ sdb_openDB(const char *name, sqlite3 **s
openFlags = SQLITE_OPEN_READONLY;
} else {
openFlags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
+ /* btrfs and sqlite seem to incorrectly open readwrite.
+ * when the file is readonly explicitly reject that issue here */
+ if ((_NSSUTIL_Access(name, PR_ACCESS_EXISTS) == PR_SUCCESS) && (_NSSUTIL_Access(name, PR_ACCESS_WRITE_OK) != PR_SUCCESS)) {
+ return SQLITE_READONLY;
+ }
}
+
/* Requires SQLite 3.5.0 or newer. */
sqlerr = sqlite3_open_v2(name, sqlDB, openFlags, NULL);
if (sqlerr != SQLITE_OK) {

View File

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

View File

@ -10,7 +10,7 @@ diff --git a/cmd/modutil/install.c b/cmd/modutil/install.c
/* Recursively delete all entries in the directory */
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
- sprintf(filename, "%s/%s", path, entry->name);
- snprintf(filename, sizeof(filename), "%s/%s", path, entry->name);
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) {
+ PR_CloseDir(dir);
+ return -1;
@ -29,7 +29,7 @@ diff --git a/cmd/signtool/util.c b/cmd/signtool/util.c
@@ -138,6 +138,12 @@ rm_dash_r(char *path)
/* Recursively delete all entries in the directory */
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
sprintf(filename, "%s/%s", path, entry->name);
snprintf(filename, sizeof(filename), "%s/%s", path, entry->name);
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name
+) >= sizeof(filename)) {
+ errorCount++;

View File

@ -1,749 +0,0 @@
# 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>

121
nss.spec
View File

@ -1,5 +1,5 @@
%global nspr_version 4.35.0
%global nss_version 3.83.0
%global nss_version 3.95.0
# NOTE: To avoid NVR clashes of nspr* packages:
# - reset %%{nspr_release} to 1, when updating %%{nspr_version}
# - increment %%{nspr_version}, when updating the NSS part only
@ -7,7 +7,7 @@
%global nss_release %baserelease
# use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when
# release number between nss and nspr are different.
%global nspr_release %baserelease
%global nspr_release %[%baserelease+15]
# only need to update this as we added new
# algorithms under nss policy control
%global crypto_policies_version 20210118
@ -61,11 +61,13 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM",
string.gsub(rpm.expand("%nss_archive_version"), "%.", "_")))
}
%global nss_nspr_archive nss-%{nss_archive_version}-with-nspr-%{nspr_archive_version}
Summary: Network Security Services
Name: nss
Version: %{nss_version}
Release: %{nss_release}.0.riscv64%{?dist}
License: MPLv2.0
License: MPL-2.0
URL: http://www.mozilla.org/projects/security/pki/nss/
Requires: nspr >= %{nspr_version}
Requires: nss-util >= %{nss_version}
@ -86,7 +88,7 @@ BuildRequires: psmisc
BuildRequires: perl-interpreter
BuildRequires: gcc-c++
Source0: https://ftp.mozilla.org/pub/security/nss/releases/%{nss_release_tag}/src/%{name}-%{nss_archive_version}.tar.gz
Source0: https://ftp.mozilla.org/pub/security/nss/releases/%{nss_release_tag}/src/%{nss_nspr_archive}.tar.gz
Source1: nss-util.pc.in
Source2: nss-util-config.in
Source3: nss-softokn.pc.in
@ -116,7 +118,6 @@ Source27: secmod.db.xml
%endif
Source28: nss-p11-kit.config
Source100: nspr-%{nspr_archive_version}.tar.gz
Source101: nspr-config.xml
# This patch uses the GCC -iquote option documented at
@ -135,15 +136,9 @@ Patch12: nss-signtool-format.patch
# fedora disabled dbm by default
Patch40: nss-no-dbm-man-page.patch
# upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=1774654
Patch50: nss-3.79-fix-client-cert-crash.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=1774659
Patch51: nss-3.79-dbtool.patch
Patch100: nspr-config-pc.patch
Patch101: nspr-gcc-atomics.patch
%description
Network Security Services (NSS) is a set of libraries designed to
support cross-platform development of security-enabled client and
@ -153,7 +148,7 @@ v3 certificates, and other security standards.
%package tools
Summary: Tools for the Network Security Services
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{nss_version}-%{release}
%description tools
Network Security Services (NSS) is a set of libraries designed to
@ -170,7 +165,7 @@ Summary: System NSS Initialization
# providing nss-system-init without version so that it can
# be replaced by a better one, e.g. supplied by the os vendor
Provides: nss-system-init
Requires: nss%{?_isa} = %{version}-%{release}
Requires: nss%{?_isa} = %{nss_version}-%{release}
Requires(post): coreutils, sed
%description sysinit
@ -181,8 +176,8 @@ any system or user configured modules.
%package devel
Summary: Development libraries for Network Security Services
Provides: nss-static = %{version}-%{release}
Requires: nss%{?_isa} = %{version}-%{release}
Provides: nss-static = %{nss_version}-%{release}
Requires: nss%{?_isa} = %{nss_version}-%{release}
Requires: nss-util-devel
Requires: nss-softokn-devel
Requires: nspr-devel >= %{nspr_version}
@ -195,9 +190,9 @@ Header and Library files for doing development with Network Security Services.
%package pkcs11-devel
Summary: Development libraries for PKCS #11 (Cryptoki) using NSS
Provides: nss-pkcs11-devel-static = %{version}-%{release}
Requires: nss-devel = %{version}-%{release}
Requires: nss-softokn-freebl-devel = %{version}-%{release}
Provides: nss-pkcs11-devel-static = %{nss_version}-%{release}
Requires: nss-devel = %{nss_version}-%{release}
Requires: nss-softokn-freebl-devel = %{nss_version}-%{release}
%description pkcs11-devel
Library files for developing PKCS #11 modules using basic NSS
@ -213,7 +208,7 @@ Utilities for Network Security Services and the Softoken module
%package util-devel
Summary: Development libraries for Network Security Services Utilities
Requires: nss-util%{?_isa} = %{version}-%{release}
Requires: nss-util%{?_isa} = %{nss_version}-%{release}
Requires: nspr-devel >= %{nspr_version}
Requires: pkgconfig
@ -224,8 +219,8 @@ Header and library files for doing development with Network Security Services.
%package softokn
Summary: Network Security Services Softoken Module
Requires: nspr >= %{nspr_version}
Requires: nss-util >= %{version}-%{release}
Requires: nss-softokn-freebl%{_isa} >= %{version}-%{release}
Requires: nss-util >= %{nss_version}-%{release}
Requires: nss-softokn-freebl%{_isa} >= %{nss_version}-%{release}
%description softokn
Network Security Services Softoken Cryptographic Module
@ -246,8 +241,8 @@ Install the nss-softokn-freebl package if you need the freebl library.
%package softokn-freebl-devel
Summary: Header and Library files for doing development with the Freebl library for NSS
Provides: nss-softokn-freebl-static = %{version}-%{release}
Requires: nss-softokn-freebl%{?_isa} = %{version}-%{release}
Provides: nss-softokn-freebl-static = %{nss_version}-%{release}
Requires: nss-softokn-freebl%{?_isa} = %{nss_version}-%{release}
%description softokn-freebl-devel
NSS Softoken Cryptographic Module Freebl Library Development Tools
@ -258,10 +253,10 @@ Developers should rely only on the officially supported NSS public API.
%package softokn-devel
Summary: Development libraries for Network Security Services
Requires: nss-softokn%{?_isa} = %{version}-%{release}
Requires: nss-softokn-freebl-devel%{?_isa} = %{version}-%{release}
Requires: nss-softokn%{?_isa} = %{nss_version}-%{release}
Requires: nss-softokn-freebl-devel%{?_isa} = %{nss_version}-%{release}
Requires: nspr-devel >= %{nspr_version}
Requires: nss-util-devel >= %{version}-%{release}
Requires: nss-util-devel >= %{nss_version}-%{release}
Requires: pkgconfig
%description softokn-devel
@ -271,7 +266,7 @@ Header and library files for doing development with Network Security Services.
Summary: Netscape Portable Runtime
Version: %{nspr_version}
Release: %{nspr_release}%{?dist}
License: MPLv2.0
License: MPL-2.0
URL: http://www.mozilla.org/projects/nspr/
Conflicts: filesystem < 3
BuildRequires: gcc
@ -294,17 +289,13 @@ Conflicts: filesystem < 3
%description -n nspr-devel
Header files for doing development with the Netscape Portable Runtime.
%prep
%setup -q -T -b 100 -n nspr-%{nspr_archive_version}
%setup -q -T -b 0 -n %{name}-%{nss_archive_version}
mv ../nspr-%{nspr_archive_version}/nspr .
cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in
%patch100 -p0 -b .flags
%patch 100 -p0 -b .flags
pushd nspr
%patch101 -p1 -b .gcc-atomics
%patch 101 -p1 -b .gcc-atomics
popd
pushd nss
@ -1093,12 +1084,70 @@ update-crypto-policies &> /dev/null || :
%{_includedir}/nspr4
%{_libdir}/pkgconfig/nspr.pc
%{_bindir}/nspr-config
%{_mandir}/man*/*
%doc %{_mandir}/man1/nspr-config.*
%changelog
* Sun Oct 2 2022 David Abdurachmanov <davidlt@rivosinc.com> - 3.83.0-1.0.riscv64
- Disable tests on riscv64
* Thu Dec 14 2023 David Abdurachmanov <davidlt@rivosinc.com> - 3.95.0-1.0.riscv64
- Disable tests on riscv64 for now
* Mon Nov 27 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.95.0-1
- Update NSS to 3.95.0
* Wed Oct 25 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.94.0-2
- revert HACL 256 code to fix binary compatibility issue.
* Wed Oct 4 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.94.0-1
- Update NSS to 3.94.0
* Thu Sep 07 2023 Bob Relyea <rrelyea@redhat.com> - 3.93.0-2
- Update License field to SPDX.
* Thu Aug 31 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.93.0-1
- Update NSS to 3.93.0
* Tue Aug 1 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.92.0-1
- Update NSS to 3.92.0
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.91.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 4 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.91.0-1
- Update NSS to 3.91.0
* Tue Jun 6 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.90.0-1
- Add patch for https://bugzilla.mozilla.org/show_bug.cgi?id=1836781 &
https://bugzilla.mozilla.org/show_bug.cgi?id=1836925
* Mon Jun 5 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.90.0-1
- Update %patch syntax
* Mon Jun 5 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.90.0-1
- Update NSS to 3.90.0
* Fri May 5 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.89.0-1
- combine nss and nspr source togeather
* Fri May 5 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.89.0-1
- replace %{version} with %{nss_version} as it version can be overiden.
* Fri Mar 10 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.89.0-1
- Update NSS to 3.89.0
* Fri Feb 10 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.88.1-1
- Update NSS to 3.88.1
* Tue Jan 24 2023 Bob Relyea - 3.87.0-2
- Fix rebuild errors
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.87.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Jan 10 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.87.0-1
- Update NSS to 3.87 & remove unused patches
* Thu Nov 17 2022 Bob Relyea <rrelyea@redhat.com> - 3.85.0-1
- update to NSS 3.83
* Fri Sep 9 2022 Bob Relyea <rrelyea@redhat.com> - 3.83.0-1
- update to NSS 3.83

10
plans/gnutls-2way.fmf Normal file
View File

@ -0,0 +1,10 @@
summary: Upstreamed interop-2way tests
contact: Stanislav Zidek <szidek@redhat.com>
discover:
# upstreamed tests (public)
- name: interop-gnutls-2way
how: fmf
url: https://gitlab.com/redhat-crypto/tests/interop.git
filter: 'tag: interop-nss & tag: interop-gnutls & tag: interop-2way'
execute:
how: tmt

10
plans/openssl-2way.fmf Normal file
View File

@ -0,0 +1,10 @@
summary: Upstreamed interop-2way tests
contact: Stanislav Zidek <szidek@redhat.com>
discover:
# upstreamed tests (public)
- name: interop-openssl-2way
how: fmf
url: https://gitlab.com/redhat-crypto/tests/interop.git
filter: 'tag: interop-nss & tag: interop-openssl & tag: interop-2way'
execute:
how: tmt

10
plans/openssl-reneg.fmf Normal file
View File

@ -0,0 +1,10 @@
summary: Upstreamed interop-nss-openssl renegotiation test
contact: Stanislav Zidek <szidek@redhat.com>
discover:
# upstreamed tests (public)
- name: interop-openssl-reneg
how: fmf
url: https://gitlab.com/redhat-crypto/tests/interop.git
filter: 'tag: interop-nss & tag: interop-openssl & tag: interop-reneg'
execute:
how: tmt

View File

@ -0,0 +1,10 @@
summary: Upstreamed interop tests - short tests which do not need to run in parallel
contact: Stanislav Zidek <szidek@redhat.com>
discover:
# upstreamed tests (public)
- name: interop-other+nss-fast
how: fmf
url: https://gitlab.com/redhat-crypto/tests/interop.git
filter: 'tag: interop-nss & tag: -interop-slow'
execute:
how: tmt

View File

@ -1,4 +1,3 @@
SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06
SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7
SHA512 (nss-3.83.tar.gz) = 550cf1116e39e58041feaa67913f570d791e8153cc0522ba7ae02e27a61e0a4e6a25224be0f25d51a842dc11c70d600263450ebff0a9fdaa2840bafa3fc9ddd5
SHA512 (nspr-4.35.tar.gz) = 502815833116e25f79ddf71d1526484908aa92fbc55f8a892729cb404a4daafcc0470a89854cd080d2d20299fdb7d9662507c5362c7ae661cbacf308ac56ef7f
SHA512 (nss-3.95-with-nspr-4.35.tar.gz) = 8394a0381db5b5d7f975f5057e0578909901244616ccaca694c1932fd9428e651a52bbf3f30e4d993e692538a603a57df1eae5e9badda3a1291d35836ab02ecd

View File

@ -1,64 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/nss/Regression/NSS-tools-should-not-use-SHA1-by-default-when
# Description: NSS tools should not use SHA1 by default when
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/nss/Regression/NSS-tools-should-not-use-SHA1-by-default-when
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Hubert Kario <hkario@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: NSS tools should not use SHA1 by default when" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: nss openssl" >> $(METADATA)
@echo "Requires: nss nss-tools openssl" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -1,4 +0,0 @@
PURPOSE of NSS-tools-should-not-use-SHA1-by-default-when
Description: NSS tools should not use SHA1 by default when
Author: Hubert Kario <hkario@redhat.com>
Summary: NSS tools should not use SHA1 by default when generating digital signatures/certificates

View File

@ -1,125 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of NSS-tools-should-not-use-SHA1-by-default-when
# Description: NSS tools should not use SHA1 by default when
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="nss"
PACKAGES="nss openssl"
DBDIR="nssdb"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm --all
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "mkdir nssdb"
rlRun "certutil -N -d $DBDIR --empty-password"
rlLogInfo "Create a JAR file"
rlRun "mkdir java-dir"
rlRun "pushd java-dir"
rlRun "mkdir META-INF mypackage"
rlRun "echo 'Main-Class: mypackage/MyMainFile' > META-INF/MANIFEST.MF"
rlRun "echo 'Those are not the droids you are looking for' > mypackage/MyMainFile.class"
#rlRun "jar -cfe package.jar mypackage/MyMainFile mypackage/MyMainFile.class"
rlRun "popd"
#rlRun "mv java-dir/package.jar ."
rlPhaseEnd
rlPhaseStartTest "Self signing certificates"
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
rlRun "certutil -d $DBDIR -S -n 'CA' -t 'cTC,cTC,cTC' -s 'CN=CA' -x -z noise"
rlRun -s "certutil -d $DBDIR -L -n 'CA' -a | openssl x509 -noout -text"
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Signing certificates"
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
rlRun "certutil -d $DBDIR -S -n 'server' -t 'u,u,u' -s 'CN=server.example.com' -c 'CA' -z noise --nsCertType sslClient,sslServer,objectSigning,smime"
rlRun -s "certutil -d $DBDIR -L -n 'server' -a | openssl x509 -noout -text"
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Certificate request"
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
rlRun "mkdir srv2db"
rlRun "certutil -d srv2db -N --empty-password"
rlRun "certutil -d srv2db -R -s CN=www.example.com -o srv2.req -a -z noise"
rlRun -s "openssl req -noout -text -in srv2.req"
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
rlRun "certutil -d $DBDIR -C -c 'CA' -i srv2.req -a -o srv2.crt"
rlRun -s "openssl x509 -in srv2.crt -noout -text"
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
rlRun "rm -rf srv2db"
rlPhaseEnd
rlPhaseStartTest "Certificate request with SHA1"
rlRun "dd if=/dev/urandom of=noise bs=1 count=32 >/dev/null"
rlRun "mkdir srv2db"
rlRun "certutil -d srv2db -N --empty-password"
rlRun "certutil -d srv2db -R -s CN=www.example.com -o srv2.req -a -z noise -Z SHA1"
rlRun -s "openssl req -noout -text -in srv2.req"
rlAssertGrep "Signature Algorithm: sha1WithRSAEncryption" "$rlRun_LOG"
rlRun "certutil -d $DBDIR -C -c 'CA' -i srv2.req -a -o srv2.crt"
rlRun -s "openssl x509 -in srv2.crt -noout -text"
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" "$rlRun_LOG"
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
rlRun "rm -rf srv2db"
rlPhaseEnd
rlPhaseStartTest "Signing CMS messages"
rlRun "echo 'This is a document' > document.txt"
rlRun "cmsutil -S -d $DBDIR -N 'server' -i document.txt -o document.cms"
rlRun -s "openssl cms -in document.cms -inform der -noout -cmsout -print"
rlAssertGrep "algorithm: sha256" $rlRun_LOG
rlAssertNotGrep "algorithm: sha1" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "CRL signing"
rlRun "echo $(date --utc +update=%Y%m%d%H%M%SZ) > script"
rlRun "echo $(date -d 'next week' --utc +nextupdate=%Y%m%d%H%M%SZ) >> script"
rlRun "echo addext crlNumber 0 1245 >>script"
rlRun "echo addcert 12 $(date -d 'yesterday' --utc +%Y%m%d%H%M%SZ) >>script"
rlRun "echo addext reasonCode 0 0 >>script"
rlRun "cat script"
rlRun "crlutil -G -c script -d $DBDIR -n CA -o ca.crl"
rlRun -s "openssl crl -in ca.crl -inform der -noout -text"
rlAssertGrep "Signature Algorithm: sha256WithRSAEncryption" $rlRun_LOG
rlAssertNotGrep "Signature Algorithm: sha1WithRSAEncryption" $rlRun_LOG
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -1,12 +0,0 @@
---
# This first play always runs on the local staging system
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- NSS-tools-should-not-use-SHA1-by-default-when
required_packages:
- nss-tools
- nss