Compare commits
11 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f41c81179b | ||
|
|
7b4377d517 | ||
|
|
2f083e09ed | ||
|
|
3816950cb6 | ||
|
|
8bd4688e24 | ||
|
|
e760902fdc | ||
|
|
7a91545944 | ||
|
|
82127e98f7 | ||
|
|
a7057b9bf6 | ||
|
|
3eb1753373 | ||
|
|
213ac5f13e |
37 changed files with 1316 additions and 107473 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
44
.gitignore
vendored
44
.gitignore
vendored
|
|
@ -70,47 +70,3 @@ TestUser51.cert
|
|||
/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
|
||||
/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
|
||||
/nss-3.96-with-nspr-4.35.tar.gz
|
||||
/nss-3.96.1-with-nspr-4.35.tar.gz
|
||||
/nss-3.97-with-nspr-4.35.tar.gz
|
||||
/nss-3.98-with-nspr-4.35.tar.gz
|
||||
/nss-3.99-with-nspr-4.35.tar.gz
|
||||
/nss-3.100-with-nspr-4.35.tar.gz
|
||||
/nss-3.101-with-nspr-4.35.tar.gz
|
||||
/nss-3.103-with-nspr-4.35.tar.gz
|
||||
/nss-3.104-with-nspr-4.35.tar.gz
|
||||
/nss-3.105-with-nspr-4.35.tar.gz
|
||||
/nss-3.106-with-nspr-4.36.tar.gz
|
||||
/nss-3.107-with-nspr-4.36.tar.gz
|
||||
/nss-3.108-with-nspr-4.36.tar.gz
|
||||
/nss-3.109-with-nspr-4.36.tar.gz
|
||||
/nss-3.110-with-nspr-4.36.tar.gz
|
||||
/nss-3.111-with-nspr-4.36.tar.gz
|
||||
/nss-3.112-with-nspr-4.36.tar.gz
|
||||
/nss-3.113-with-nspr-4.36.tar.gz
|
||||
/nss-3.114-with-nspr-4.37.tar.gz
|
||||
/nss-3.115-with-nspr-4.37.tar.gz
|
||||
/nss-3.115.1-with-nspr-4.37.tar.gz
|
||||
/nss-3.116-with-nspr-4.37.tar.gz
|
||||
/nss-3.117-with-nspr-4.37.tar.gz
|
||||
/nss-3.118.1-with-nspr-4.37.tar.gz
|
||||
/nss-3.118-ml-dsa-test-for-sign-verify-pkcs12_files.tar.xz
|
||||
/nss-3.119-with-nspr-4.38.2.tar.gz
|
||||
/nss-3.119.1-with-nspr-4.38.2.tar.gz
|
||||
/nss-3_119_1-with-nspr-4.38.2.tar.gz
|
||||
|
|
|
|||
1
ci.fmf
1
ci.fmf
|
|
@ -1 +0,0 @@
|
|||
resultsdb-testcase: separate
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
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 @@
|
||||
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
|
||||
--- a/pr/include/md/_linux.h
|
||||
+++ b/pr/include/md/_linux.h
|
||||
@@ -82,53 +82,73 @@
|
||||
#define NO_DLOPEN_NULL
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD_kernel__) || defined(__GNU__)
|
||||
#define _PR_HAVE_SOCKADDR_LEN
|
||||
#endif
|
||||
|
||||
#if defined(__i386__)
|
||||
|
|
@ -17,7 +22,11 @@ diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
|||
#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
|
||||
#define _MD_ATOMIC_INCREMENT _PR_x86_AtomicIncrement
|
||||
extern PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_DECREMENT _PR_x86_AtomicDecrement
|
||||
extern PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||
#define _MD_ATOMIC_ADD _PR_x86_AtomicAdd
|
||||
extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||
#define _MD_ATOMIC_SET _PR_x86_AtomicSet
|
||||
#endif
|
||||
|
|
@ -25,7 +34,15 @@ diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
|||
|
||||
#if defined(__ia64__)
|
||||
#define _PR_HAVE_ATOMIC_OPS
|
||||
@@ -131,6 +141,15 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt3
|
||||
#define _MD_INIT_ATOMIC()
|
||||
extern PRInt32 _PR_ia64_AtomicIncrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_INCREMENT _PR_ia64_AtomicIncrement
|
||||
extern PRInt32 _PR_ia64_AtomicDecrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_DECREMENT _PR_ia64_AtomicDecrement
|
||||
extern PRInt32 _PR_ia64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||
#define _MD_ATOMIC_ADD _PR_ia64_AtomicAdd
|
||||
extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||
#define _MD_ATOMIC_SET _PR_ia64_AtomicSet
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__)
|
||||
|
|
@ -41,11 +58,20 @@ diff -up ./pr/include/md/_linux.h.gcc-atomics ./pr/include/md/_linux.h
|
|||
#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
|
||||
#define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement
|
||||
extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32 *val);
|
||||
#define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement
|
||||
extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||
#define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd
|
||||
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(__or1k__)
|
||||
#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)
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up nss/tests/ssl/ssl.sh.ignore_test nss/tests/ssl/ssl.sh
|
||||
--- nss/tests/ssl/ssl.sh.ignore_test 2025-04-22 10:30:10.569990667 +0200
|
||||
+++ nss/tests/ssl/ssl.sh 2025-04-22 10:30:34.773327320 +0200
|
||||
@@ -1600,7 +1600,7 @@ ssl_run_tests()
|
||||
if using_sql ; then
|
||||
ssl_policy_listsuites
|
||||
ssl_policy_selfserv
|
||||
- ssl_policy_pkix_ocsp
|
||||
+# ssl_policy_pkix_ocsp
|
||||
ssl_policy
|
||||
fi
|
||||
;;
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,610 +0,0 @@
|
|||
diff --git a/cmd/certutil/certutil.c b/cmd/certutil/certutil.c
|
||||
--- a/cmd/certutil/certutil.c
|
||||
+++ b/cmd/certutil/certutil.c
|
||||
@@ -1158,12 +1158,14 @@
|
||||
"\t\t [-f pwfile] [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
FPS "\t%s -G [-h token-name] -k dsa [-q pqgfile -g key-size] [-f pwfile]\n"
|
||||
"\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
FPS "\t%s -G [-h token-name] -k ec -q curve [-f pwfile]\n"
|
||||
"\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
- FPS "\t%s -K [-n key-name] [-h token-name] [-k dsa|ec|rsa|all]\n",
|
||||
- progName);
|
||||
+ FPS "\t%s -G [-h token-name] -k mldsa -q paramset [-f pwfile]\n"
|
||||
+ "\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName);
|
||||
+ FPS "\t%s -K [-n key-name] [-h token-name] [-k dsa|ec|rsa|mldsa|all]\n",
|
||||
+ progName);
|
||||
FPS "\t\t [-f pwfile] [-X] [-d certdir] [-P dbprefix]\n");
|
||||
FPS "\t%s --upgrade-merge --source-dir upgradeDir --upgrade-id uniqueID\n",
|
||||
progName);
|
||||
FPS "\t\t [--upgrade-token-name tokenName] [-d targetDBDir]\n");
|
||||
FPS "\t\t [-P targetDBPrefix] [--source-prefix upgradeDBPrefix]\n");
|
||||
@@ -1392,10 +1394,13 @@
|
||||
FPS "%-20s c2pnb208w1, c2tnb239v1, c2tnb239v2, c2tnb239v3, \n", "");
|
||||
FPS "%-20s c2pnb272w1, c2pnb304w1, \n", "");
|
||||
FPS "%-20s c2tnb359w1, c2pnb368w1, c2tnb431r1, secp112r1, \n", "");
|
||||
FPS "%-20s secp112r2, secp128r1, secp128r2, sect113r1, sect113r2\n", "");
|
||||
FPS "%-20s sect131r1, sect131r2\n", "");
|
||||
+ FPS "%-20s ML-DSA parameter set (mldsa only)\n",
|
||||
+ " -q paramset");
|
||||
+ FPS "%-20s valid values are ml-dsa-44, ml-dsa-65, ml-dsa-87:\n", "");
|
||||
FPS "%-20s Key database directory (default is ~/.netscape)\n",
|
||||
" -d keydir");
|
||||
FPS "%-20s Cert & Key database prefix\n",
|
||||
" -P dbprefix");
|
||||
FPS "%-20s\n"
|
||||
@@ -1484,10 +1489,11 @@
|
||||
FPS "%-20s Name of token to search (\"all\" for all tokens)\n",
|
||||
" -h token-name ");
|
||||
|
||||
FPS "%-20s Key type (\"all\" (default), \"dsa\","
|
||||
" \"ec\","
|
||||
+ " \"mldsa\","
|
||||
" \"rsa\")\n",
|
||||
" -k key-type");
|
||||
FPS "%-20s The nickname of the key or associated certificate\n",
|
||||
" -n name");
|
||||
FPS "%-20s Specify the password file\n",
|
||||
@@ -1644,10 +1650,14 @@
|
||||
" -q pqgfile");
|
||||
FPS "%-20s Elliptic curve name (ec only)\n",
|
||||
" -q curve-name");
|
||||
FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
"");
|
||||
+ FPS "%-20s ML-DSA parameter set (mldsa only)\n",
|
||||
+ " -q paramset");
|
||||
+ FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
+ "");
|
||||
FPS "%-20s Specify the password file\n",
|
||||
" -f pwfile");
|
||||
FPS "%-20s Key database directory (default is ~/.netscape)\n",
|
||||
" -d keydir");
|
||||
FPS "%-20s Cert & Key database prefix\n",
|
||||
@@ -1824,10 +1834,14 @@
|
||||
" -q pqgfile");
|
||||
FPS "%-20s Elliptic curve name (ec only)\n",
|
||||
" -q curve-name");
|
||||
FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
"");
|
||||
+ FPS "%-20s ML-DSA parameter set (mldsa only)\n",
|
||||
+ " -q paramset");
|
||||
+ FPS "%-20s See the \"-G\" option for a full list of supported names.\n",
|
||||
+ "");
|
||||
FPS "%-20s Self sign\n",
|
||||
" -x");
|
||||
FPS "%-20s Sign the certificate with RSA-PSS (the issuer key must be rsa)\n",
|
||||
" --pss-sign");
|
||||
FPS "%-20s Cert serial number\n",
|
||||
@@ -2776,13 +2790,38 @@
|
||||
upgradeID = certutil.options[opt_UpgradeID].arg;
|
||||
|
||||
if (certutil.options[opt_UpgradeTokenName].activated)
|
||||
upgradeTokenName = certutil.options[opt_UpgradeTokenName].arg;
|
||||
|
||||
+ /* must be before opt_KeySize! */
|
||||
+ /* -k key type */
|
||||
+ if (certutil.options[opt_KeyType].activated) {
|
||||
+ char *arg = certutil.options[opt_KeyType].arg;
|
||||
+ if (PL_strcmp(arg, "rsa") == 0) {
|
||||
+ keytype = rsaKey;
|
||||
+ } else if (PL_strcmp(arg, "dsa") == 0) {
|
||||
+ keytype = dsaKey;
|
||||
+ } else if (PL_strcmp(arg, "ec") == 0) {
|
||||
+ keytype = ecKey;
|
||||
+ } else if (PL_strcmp(arg, "mldsa") == 0) {
|
||||
+ keytype = mldsaKey;
|
||||
+ } else if (PL_strcmp(arg, "all") == 0) {
|
||||
+ keytype = nullKey;
|
||||
+ } else {
|
||||
+ /* use an existing private/public key pair */
|
||||
+ keysource = arg;
|
||||
+ }
|
||||
+ } else if (certutil.commands[cmd_ListKeys].activated) {
|
||||
+ keytype = nullKey;
|
||||
+ }
|
||||
+
|
||||
if (certutil.options[opt_KeySize].activated) {
|
||||
keysize = PORT_Atoi(certutil.options[opt_KeySize].arg);
|
||||
- if ((keysize < MIN_KEY_BITS) || (keysize > MAX_KEY_BITS)) {
|
||||
+ /* mldsa limits are much different that rsa and dsa, don't
|
||||
+ * do the check here */
|
||||
+ if ((keytype != mldsaKey) &&
|
||||
+ ((keysize < MIN_KEY_BITS) || (keysize > MAX_KEY_BITS))) {
|
||||
PR_fprintf(PR_STDERR,
|
||||
"%s -g: Keysize must be between %d and %d.\n",
|
||||
progName, MIN_KEY_BITS, MAX_KEY_BITS);
|
||||
return 255;
|
||||
}
|
||||
@@ -2809,29 +2848,10 @@
|
||||
progName, arg);
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
|
||||
- /* -k key type */
|
||||
- if (certutil.options[opt_KeyType].activated) {
|
||||
- char *arg = certutil.options[opt_KeyType].arg;
|
||||
- if (PL_strcmp(arg, "rsa") == 0) {
|
||||
- keytype = rsaKey;
|
||||
- } else if (PL_strcmp(arg, "dsa") == 0) {
|
||||
- keytype = dsaKey;
|
||||
- } else if (PL_strcmp(arg, "ec") == 0) {
|
||||
- keytype = ecKey;
|
||||
- } else if (PL_strcmp(arg, "all") == 0) {
|
||||
- keytype = nullKey;
|
||||
- } else {
|
||||
- /* use an existing private/public key pair */
|
||||
- keysource = arg;
|
||||
- }
|
||||
- } else if (certutil.commands[cmd_ListKeys].activated) {
|
||||
- keytype = nullKey;
|
||||
- }
|
||||
-
|
||||
if (certutil.options[opt_KeyOpFlagsOn].activated) {
|
||||
keyOpFlagsOn = GetOpFlags(certutil.options[opt_KeyOpFlagsOn].arg);
|
||||
}
|
||||
if (certutil.options[opt_KeyOpFlagsOff].activated) {
|
||||
keyOpFlagsOff = GetOpFlags(certutil.options[opt_KeyOpFlagsOff].arg);
|
||||
@@ -2870,13 +2890,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* -q PQG file or curve name */
|
||||
if (certutil.options[opt_PQGFile].activated) {
|
||||
- if ((keytype != dsaKey) && (keytype != ecKey)) {
|
||||
+ if ((keytype != dsaKey) && (keytype != ecKey) &&
|
||||
+ (keytype != mldsaKey)) {
|
||||
PR_fprintf(PR_STDERR, "%s -q: specifies a PQG file for DSA keys"
|
||||
- " (-k dsa) or a named curve for EC keys (-k ec)\n)",
|
||||
+ " (-k dsa)\n"
|
||||
+ " or a named curve for EC keys (-k ec)\n"
|
||||
+ " or a parameter set for ML-DSA keys (-k mldsa)\n",
|
||||
progName);
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/cmd/certutil/keystuff.c b/cmd/certutil/keystuff.c
|
||||
--- a/cmd/certutil/keystuff.c
|
||||
+++ b/cmd/certutil/keystuff.c
|
||||
@@ -515,10 +515,11 @@
|
||||
CK_FLAGS opFlagsOff, secuPWData *pwdata)
|
||||
{
|
||||
CK_MECHANISM_TYPE mechanism;
|
||||
PK11RSAGenParams rsaparams;
|
||||
SECKEYPQGParams *dsaparams = NULL;
|
||||
+ CK_ULONG paramSet;
|
||||
void *params;
|
||||
SECKEYPrivateKey *privKey = NULL;
|
||||
|
||||
if (slot == NULL)
|
||||
return NULL;
|
||||
@@ -567,10 +568,54 @@
|
||||
mechanism = CKM_EC_KEY_PAIR_GEN;
|
||||
/* For EC keys, PQGFile determines EC parameters */
|
||||
if ((params = (void *)getECParams(pqgFile)) == NULL)
|
||||
return NULL;
|
||||
break;
|
||||
+ case mldsaKey:
|
||||
+ mechanism = CKM_ML_DSA_KEY_PAIR_GEN;
|
||||
+ /* set paramset */
|
||||
+ paramSet = 0;
|
||||
+ if (pqgFile) {
|
||||
+ if (PORT_Strcasecmp(pqgFile, "ML-DSA-44") == 0) {
|
||||
+ paramSet = CKP_ML_DSA_44;
|
||||
+ } else if (PORT_Strcasecmp(pqgFile, "ML-DSA-65") == 0) {
|
||||
+ paramSet = CKP_ML_DSA_65;
|
||||
+ } else if (PORT_Strcasecmp(pqgFile, "ML-DSA-87") == 0) {
|
||||
+ paramSet = CKP_ML_DSA_87;
|
||||
+ } else {
|
||||
+ /* if we set pqgfile, it had better be right, don't
|
||||
+ * fall back to key size */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ } else
|
||||
+ switch (size) {
|
||||
+ /* optionally use the size, either the actual size in bytes
|
||||
+ * or the short hand ('44', '65', '87') */
|
||||
+ case 44:
|
||||
+ case 2560:
|
||||
+ paramSet = CKP_ML_DSA_44;
|
||||
+ break;
|
||||
+ case 65:
|
||||
+ case 4032:
|
||||
+ paramSet = CKP_ML_DSA_65;
|
||||
+ break;
|
||||
+ case 87:
|
||||
+ case 4896:
|
||||
+ paramSet = CKP_ML_DSA_87;
|
||||
+ break;
|
||||
+ default:
|
||||
+ /* force a size to be specified somewhere */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ /* paranoia, shouldn't be able to happen logically. Code
|
||||
+ * scanners will scream, but I like belt and suspenders */
|
||||
+ if (paramSet == 0) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ params = ¶mSet;
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fprintf(stderr, "\n\n");
|
||||
diff --git a/cmd/pk11importtest/pk11importtest.c b/cmd/pk11importtest/pk11importtest.c
|
||||
--- a/cmd/pk11importtest/pk11importtest.c
|
||||
+++ b/cmd/pk11importtest/pk11importtest.c
|
||||
@@ -64,11 +64,10 @@
|
||||
SECKEYPrivateKey *privKey = NULL;
|
||||
PK11GenericObject *objs = NULL;
|
||||
PK11GenericObject *obj = NULL;
|
||||
SECKEYEncryptedPrivateKeyInfo *epki = NULL;
|
||||
PRBool keyFound = 0;
|
||||
- KeyType keyType;
|
||||
|
||||
fprintf(stderr, "Testing %s PrivateKeyImport ***********************\n",
|
||||
testname);
|
||||
|
||||
/* generate a temp key */
|
||||
@@ -88,28 +87,19 @@
|
||||
SECU_PrintError(progName, "PK11_ExportEncryptedPrivKeyInfo Failed");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Save the public value, which we will need on import */
|
||||
- keyType = pubKey->keyType;
|
||||
- switch (keyType) {
|
||||
- case rsaKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.rsa.modulus);
|
||||
- break;
|
||||
- case dhKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.dh.publicValue);
|
||||
- break;
|
||||
- case dsaKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.dsa.publicValue);
|
||||
- break;
|
||||
- case ecKey:
|
||||
- SECITEM_CopyItem(NULL, &pubValue, &pubKey->u.ec.publicValue);
|
||||
- break;
|
||||
- default:
|
||||
- fprintf(stderr, "Unknown keytype = %d\n", keyType);
|
||||
- goto cleanup;
|
||||
+ const SECItem *constValue = PK11_GetPublicValueFromPublicKey(pubKey);
|
||||
+ KeyType keyType = pubKey->keyType;
|
||||
+
|
||||
+ if (constValue == NULL) {
|
||||
+ fprintf(stderr, "Unknown keytype = %d\n", keyType);
|
||||
+ goto cleanup;
|
||||
}
|
||||
+
|
||||
+ SECITEM_CopyItem(NULL, &pubValue, constValue);
|
||||
if (pubValue.data == NULL) {
|
||||
SECU_PrintError(progName, "Unable to allocate memory");
|
||||
goto cleanup;
|
||||
}
|
||||
dumpItem("pubValue", &pubValue);
|
||||
@@ -218,23 +207,25 @@
|
||||
opt_PWFile,
|
||||
opt_PWString,
|
||||
opt_NoRSA,
|
||||
opt_NoDSA,
|
||||
opt_NoEC,
|
||||
- opt_NoDH
|
||||
+ opt_NoDH,
|
||||
+ opt_NoMLDSA,
|
||||
};
|
||||
|
||||
static secuCommandFlag options[] = {
|
||||
{ /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_KeySize */ 'k', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_ECCurve */ 'C', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_PWFile */ 'f', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_PWString */ 'p', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_NORSA */ 'r', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_NoDSA */ 'D', PR_TRUE, 0, PR_FALSE },
|
||||
+ { /* opt_NoEC */ 'e', PR_TRUE, 0, PR_FALSE },
|
||||
{ /* opt_NoDH */ 'h', PR_TRUE, 0, PR_FALSE },
|
||||
- { /* opt_NoEC */ 'e', PR_TRUE, 0, PR_FALSE },
|
||||
+ { /* opt_NoMLDSA */ 'm', PR_TRUE, 0, PR_FALSE },
|
||||
};
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -246,11 +237,13 @@
|
||||
secuPWData pwArgs = { PW_NONE, 0 };
|
||||
PRBool doRSA = PR_TRUE;
|
||||
PRBool doDSA = PR_TRUE;
|
||||
PRBool doDH = PR_FALSE; /* NSS currently can't export wrapped DH keys */
|
||||
PRBool doEC = PR_TRUE;
|
||||
+ PRBool doMLDSA = PR_FALSE;
|
||||
PQGParams *pqgParams = NULL;
|
||||
+ CK_ULONG paramSet = CKP_ML_DSA_44;
|
||||
int keySize;
|
||||
|
||||
args.numCommands = 0;
|
||||
args.numOptions = sizeof(options) / sizeof(secuCommandFlag);
|
||||
args.commands = NULL;
|
||||
@@ -298,10 +291,13 @@
|
||||
doDH = PR_FALSE;
|
||||
}
|
||||
if (args.options[opt_NoEC].activated) {
|
||||
doEC = PR_FALSE;
|
||||
}
|
||||
+ if (args.options[opt_NoMLDSA].activated) {
|
||||
+ doMLDSA = PR_FALSE;
|
||||
+ }
|
||||
|
||||
slot = PK11_GetInternalKeySlot();
|
||||
if (slot == NULL) {
|
||||
SECU_PrintError(progName, "Couldn't find the internal key slot\n");
|
||||
return 255;
|
||||
@@ -386,10 +382,20 @@
|
||||
fprintf(stderr, "ECC Import Failed!\n");
|
||||
failed = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
+ if (doMLDSA) {
|
||||
+ rv = handleEncryptedPrivateImportTest(progName, slot, "ML-DSA",
|
||||
+ CKM_ML_DSA_KEY_PAIR_GEN,
|
||||
+ ¶mSet, &pwArgs);
|
||||
+ if (rv != SECSuccess) {
|
||||
+ fprintf(stderr, "ML-DSA Import Failed!\n");
|
||||
+ failed = PR_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (pqgParams) {
|
||||
PK11_PQG_DestroyParams(pqgParams);
|
||||
}
|
||||
|
||||
if (slot) {
|
||||
diff --git a/tests/cert/cert.sh b/tests/cert/cert.sh
|
||||
--- a/tests/cert/cert.sh
|
||||
+++ b/tests/cert/cert.sh
|
||||
@@ -104,10 +104,13 @@
|
||||
if [ -z ${NSS_DISABLE_DSA} ]; then
|
||||
cert_add_algorithm "DSA" "-dsa" "-k dsa" "true" 20000
|
||||
fi
|
||||
# NOTE: curve is added later, so the full command would be '-k ec -q curve'
|
||||
cert_add_algorithm "ECC" "-ec" "-k ec -q" "true" 10000
|
||||
+ cert_add_algorithm "ML-DSA-44" "-ml-dsa-44" "-k mldsa -q ml-dsa-44" "false" 30000
|
||||
+ cert_add_algorithm "ML-DSA-65" "-ml-dsa-65" "-k mldsa -q ml-dsa-65" "false" 40000
|
||||
+ cert_add_algorithm "ML-DSA-87" "-ml-dsa-87" "-k mldsa -q ml-dsa-87" "false" 50000
|
||||
# currently rsa-pss is only enabled for a subset of tests
|
||||
# this will enable a full suite of RSA-PSS certs, and we would
|
||||
# then remove the explicit ones
|
||||
# ulike the other tests, we would need to change ssl tests as this
|
||||
# will rename some of the RSA-PSS certificates.
|
||||
@@ -527,10 +530,19 @@
|
||||
cert_ec_CA "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}" "${ALG}"
|
||||
;;
|
||||
RSA-PSS)
|
||||
cert_rsa_pss_CA "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}" "${ALG}"
|
||||
;;
|
||||
+ ML-DSA-44)
|
||||
+ cert_ml_dsa_CA ml-dsa-44 "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}"
|
||||
+ ;;
|
||||
+ ML-DSA-65)
|
||||
+ cert_ml_dsa_CA ml-dsa-65 "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}"
|
||||
+ ;;
|
||||
+ ML-DSA-87)
|
||||
+ cert_ml_dsa_CA ml-dsa-65 "${CUR_CADIR}" "${NICKNAME}" "${SIGNER}" "${TRUSTARG}" "${DOMAIN}" "${CERTSERIAL}"
|
||||
+ ;;
|
||||
*)
|
||||
Exit 9 "Fatal - unknown key type ${KEY_TYPE}, failed to create CA cert"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -683,13 +695,72 @@
|
||||
Exit 7 "Fatal - failed to export dsa root cert"
|
||||
fi
|
||||
cp root-dsa.cert ${NICKNAME}.ca.cert
|
||||
}
|
||||
|
||||
++################################ cert_ml_dsa_CA #############################
|
||||
+# local shell function to build the Temp. Certificate Authority (CA)
|
||||
+# used for testing purposes, creating a CA Certificate and a root cert
|
||||
+# This is the ML-DSA version of cert_CA.
|
||||
+##########################################################################
|
||||
+cert_ml_dsa_CA()
|
||||
+{
|
||||
+ PARAM_SET=$1
|
||||
+ CUR_CADIR=$2
|
||||
+ NICKNAME=$3
|
||||
+ SIGNER=$4
|
||||
+ TRUSTARG=$5
|
||||
+ DOMAIN=$6
|
||||
+ CERTSERIAL=$7
|
||||
|
||||
+ echo "$SCRIPTNAME: Creating a ML-DSA ($PARAM_SET) CA Certificate $NICKNAME =========================="
|
||||
+
|
||||
+ if [ ! -d "${CUR_CADIR}" ]; then
|
||||
+ mkdir -p "${CUR_CADIR}"
|
||||
+ fi
|
||||
+ cd ${CUR_CADIR}
|
||||
+ pwd
|
||||
+
|
||||
+ LPROFILE=.
|
||||
+ if [ -n "${MULTIACCESS_DBM}" ]; then
|
||||
+ LPROFILE="multiaccess:${DOMAIN}"
|
||||
+ fi
|
||||
|
||||
+ ################# Creating a ML-DSA CA Cert ###############################
|
||||
+ #
|
||||
+ CU_ACTION="Creating ML-DSA ($PARAM_SET) CA Cert $NICKNAME "
|
||||
+ CU_SUBJECT=$ALL_CU_SUBJECT
|
||||
+ certu -S -n $NICKNAME -k mldsa -q $PARAM_SET -t $TRUSTARG -v 600 $SIGNER \
|
||||
+ -d ${LPROFILE} -1 -2 -5 -f ${R_PWFILE} -z ${R_NOISE_FILE} \
|
||||
+ -m $CERTSERIAL 2>&1 <<CERTSCRIPT
|
||||
+5
|
||||
+6
|
||||
+9
|
||||
+n
|
||||
+y
|
||||
+-1
|
||||
+n
|
||||
+5
|
||||
+6
|
||||
+7
|
||||
+9
|
||||
+n
|
||||
+CERTSCRIPT
|
||||
|
||||
+ if [ "$RET" -ne 0 ]; then
|
||||
+ echo "return value is $RET"
|
||||
+ Exit 6 "Fatal - failed to create ML-DSA ($PARAM_SET) CA cert"
|
||||
+ fi
|
||||
+
|
||||
+ ################# Exporting ML-DSA Root Cert ###############################
|
||||
+ #
|
||||
+ CU_ACTION="Exporting ML-DSA ($PARAM_SET) Root Cert"
|
||||
+ certu -L -n $NICKNAME -r -d ${LPROFILE} -o ${NICKNAME}.ca.cert
|
||||
+ if [ "$RET" -ne 0 ]; then
|
||||
+ Exit 7 "Fatal - failed to export $PARAM_SET root cert"
|
||||
+ fi
|
||||
+}
|
||||
|
||||
################################ cert_rsa_pss_CA #############################
|
||||
# local shell function to build the Temp. Certificate Authority (CA)
|
||||
# used for testing purposes, creating a CA Certificate and a root cert
|
||||
# This is the RSA-PSS version of cert_CA.
|
||||
@@ -1208,11 +1279,11 @@
|
||||
# local shell function to create certificates for FIPS tests
|
||||
##############################################################################
|
||||
cert_fips()
|
||||
{
|
||||
CERTFAILED=0
|
||||
- echo "$SCRIPTNAME: Creating FIPS 140 DSA Certificates =============="
|
||||
+ echo "$SCRIPTNAME: Creating FIPS 140 Certificates =============="
|
||||
cert_init_cert "${FIPSDIR}" "FIPS PUB 140 Test Certificate" 1000 "${D_FIPS}"
|
||||
|
||||
CU_ACTION="Initializing ${CERTNAME}'s Cert DB"
|
||||
certu -N -d "${PROFILEDIR}" -f "${R_FIPSPWFILE}" 2>&1
|
||||
|
||||
diff --git a/tests/tools/tools.sh b/tests/tools/tools.sh
|
||||
--- a/tests/tools/tools.sh
|
||||
+++ b/tests/tools/tools.sh
|
||||
@@ -126,10 +126,19 @@
|
||||
cp ${QADIR}/tools/pbmac1-valid-sha512.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/pbmac1-invalid-bad-iter.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/pbmac1-invalid-bad-salt.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/pbmac1-invalid-no-length.p12 ${TOOLSDIR}/data
|
||||
cp ${QADIR}/tools/corrupted_cert_bag.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-44-both.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-44-key.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-65-both.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-65-key.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-87-both.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/ietf-ml-dsa-87-key.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/openssl-ml-dsa-44.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/openssl-ml-dsa-65.p12 ${TOOLSDIR}/data
|
||||
+ cp ${QADIR}/tools/openssl-ml-dsa-87.p12 ${TOOLSDIR}/data
|
||||
|
||||
cd ${TOOLSDIR}
|
||||
}
|
||||
|
||||
########################## list_p12_file ###############################
|
||||
@@ -479,10 +488,34 @@
|
||||
echo "pk12util -l Alice-ec-long.p12 -w ${R_LONGPWFILE}"
|
||||
${BINDIR}/pk12util -l Alice-ec-long.p12 -w ${R_LONGPWFILE} 2>&1
|
||||
ret=$?
|
||||
html_msg $ret 0 "Listing Alice's pk12 EC file with long pw (pk12util -l)"
|
||||
check_tmpfile
|
||||
+
|
||||
+ echo "$SCRIPTNAME: Exporting Alice's ML-DSA cert & key---------------"
|
||||
+ echo "pk12util -o Alice-mldsa.p12 -n \"Alice-ml-dsa-44\" -d ${P_R_ALICEDIR} -k ${R_PWFILE} \\"
|
||||
+ echo " -w ${R_PWFILE}"
|
||||
+ ${BINDIR}/pk12util -o Alice-mldsa.p12 -n "Alice-ml-dsa-44" -d ${P_R_ALICEDIR} -k ${R_PWFILE} \
|
||||
+ -w ${R_PWFILE} 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Exporting Alice's ML-DSA cert & key (pk12util -o)"
|
||||
+ check_tmpfile
|
||||
+ verify_p12 Alice-mldsa.p12 "default" "default" "default"
|
||||
+
|
||||
+ echo "$SCRIPTNAME: Importing Alice's ML-DSA cert & key --------------"
|
||||
+ echo "pk12util -i Alice-mldsa.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -w ${R_PWFILE}"
|
||||
+ ${BINDIR}/pk12util -i Alice-mldsa.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -w ${R_PWFILE} 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Importing Alice's ML-DSA cert & key (pk12util -i)"
|
||||
+ check_tmpfile
|
||||
+
|
||||
+ echo "$SCRIPTNAME: Listing Alice's pk12 ML-DSA file -----------------"
|
||||
+ echo "pk12util -l Alice-mldsa.p12 -w ${R_PWFILE}"
|
||||
+ ${BINDIR}/pk12util -l Alice-mldsa.p12 -w ${R_PWFILE} 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Listing Alice's pk12 ML-DSA file (pk12util -l)"
|
||||
+ check_tmpfile
|
||||
}
|
||||
|
||||
tools_p12_import_old_files()
|
||||
{
|
||||
echo "$SCRIPTNAME: Importing PKCS#12 files created with older NSS --------------"
|
||||
@@ -527,10 +560,37 @@
|
||||
check_tmpfile
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
+tools_p12_ml_dsa_import()
|
||||
+{
|
||||
+ echo "$SCRIPTNAME: Testing ml-dsa compatibility with pkcs12 --------------"
|
||||
+ for i in 44 65 87
|
||||
+ do
|
||||
+ echo "${BINDIR}/pk12util -i ${TOOLSDIR}/data/openssl-ml-dsa-$i.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1"
|
||||
+ ${BINDIR}/pk12util -i ${TOOLSDIR}/data/openssl-ml-dsa-$i.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Importing openssl encoded ml-dsa-$i private key from PKCS#12 file"
|
||||
+ check_tmpfile
|
||||
+ for j in 'key' 'both'
|
||||
+ do
|
||||
+ echo "${BINDIR}/pk12util -i ${TOOLSDIR}/data/ietf-ml-dsa-$i-$j.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1"
|
||||
+ ${BINDIR}/pk12util -i ${TOOLSDIR}/data/ietf-ml-dsa-$i-$j.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W 'test' 2>&1
|
||||
+ ret=$?
|
||||
+ html_msg $ret 0 "Importing openssl encoded ml-dsa-$i private key from PKCS#12 file"
|
||||
+ check_tmpfile
|
||||
+ html_msg $ret 0 "Importing ietf sample ml-dsa-$i-$j private key from PKCS#12 file"
|
||||
+
|
||||
+ # each cert has the same issuer/sn, so we can't hold more than one in
|
||||
+ # the data base
|
||||
+ echo "${BINDIR}/certutil -F -n "ietf ml-dsa-$i-$j sample" -d ${P_R_COPYDIR} -f ${R_PWFILE}"
|
||||
+ ${BINDIR}/certutil -F -n "ietf ml-dsa-$i-$j sample" -d ${P_R_COPYDIR} -f ${R_PWFILE}
|
||||
+ done
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
tools_p12_import_pbmac1_samples()
|
||||
{
|
||||
echo "$SCRIPTNAME: Importing private key pbmac1 PKCS#12 file --------------"
|
||||
echo "${BINDIR}/pk12util -i ${TOOLSDIR}/data/pbmac1-valid-sha256.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234'"
|
||||
${BINDIR}/pk12util -i ${TOOLSDIR}/data/pbmac1-valid-sha256.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' 2>&1
|
||||
@@ -581,11 +641,11 @@
|
||||
# pkcs12 tests and complete in a reasonable time. Use the iterateration
|
||||
# count from the previous tests to determine how many tests
|
||||
# we can run.
|
||||
iteration_count=$(pp -t p12 -i Alice-ec.p12 | grep "Iterations: " | sed -e 's;.*Iterations: ;;' -e 's;(.*).*;;')
|
||||
echo "Iteration count=${iteration_count}"
|
||||
- if [ -n "${iteration_count}" -a ${iteration_count} -le 10000 ]; then
|
||||
+ if [-z "${NSS_PK12_SHORT_TESTS}" -a -n "${iteration_count}" -a ${iteration_count} -le 10000 ]; then
|
||||
tools_p12_export_list_import_all_pkcs5v2_ciphers
|
||||
tools_p12_export_list_import_all_pkcs12v2pbe_ciphers
|
||||
else
|
||||
tools_p12_export_list_import_most_ciphers
|
||||
fi
|
||||
@@ -593,10 +653,11 @@
|
||||
tools_p12_export_with_invalid_ciphers
|
||||
tools_p12_import_old_files
|
||||
tools_p12_import_pbmac1_samples
|
||||
if using_sql; then
|
||||
tools_p12_import_rsa_pss_private_key
|
||||
+ tools_p12_ml_dsa_import
|
||||
tools_p12_policy
|
||||
fi
|
||||
}
|
||||
|
||||
############################## tools_sign ##############################
|
||||
|
||||
|
||||
|
|
@ -1,418 +0,0 @@
|
|||
diff --git a/cmd/lib/secutil.c b/cmd/lib/secutil.c
|
||||
--- a/cmd/lib/secutil.c
|
||||
+++ b/cmd/lib/secutil.c
|
||||
@@ -4387,10 +4387,13 @@
|
||||
MAKE_SCHEME(rsa_pss_pss_sha512),
|
||||
MAKE_SCHEME(dsa_sha1),
|
||||
MAKE_SCHEME(dsa_sha256),
|
||||
MAKE_SCHEME(dsa_sha384),
|
||||
MAKE_SCHEME(dsa_sha512),
|
||||
+ MAKE_SCHEME(mldsa44),
|
||||
+ MAKE_SCHEME(mldsa65),
|
||||
+ MAKE_SCHEME(mldsa87),
|
||||
};
|
||||
|
||||
static const size_t sslSignatureSchemeStringLen =
|
||||
PR_ARRAY_SIZE(sslSignatureSchemeStringArray);
|
||||
|
||||
diff --git a/gtests/ssl_gtest/ssl_auth_unittest.cc b/gtests/ssl_gtest/ssl_auth_unittest.cc
|
||||
--- a/gtests/ssl_gtest/ssl_auth_unittest.cc
|
||||
+++ b/gtests/ssl_gtest/ssl_auth_unittest.cc
|
||||
@@ -2293,6 +2293,28 @@
|
||||
TlsConnectTestBase::kTlsV12,
|
||||
::testing::Values(TlsAgent::kServerEcdsa256,
|
||||
TlsAgent::kServerEcdsa384),
|
||||
::testing::Values(ssl_auth_ecdsa),
|
||||
::testing::Values(ssl_sig_ecdsa_sha1)));
|
||||
+// ML-DSA is only allowed to be used in TLS 1.3 or greater
|
||||
+INSTANTIATE_TEST_SUITE_P(
|
||||
+ SignatureSchemeMlDsa44Tls13, TlsSignatureSchemeConfiguration,
|
||||
+ ::testing::Combine(TlsConnectTestBase::kTlsVariantsAll,
|
||||
+ TlsConnectTestBase::kTlsV13,
|
||||
+ ::testing::Values(TlsAgent::kServerMlDsa44),
|
||||
+ ::testing::Values(ssl_auth_mldsa44),
|
||||
+ ::testing::Values(ssl_sig_mldsa44)));
|
||||
+INSTANTIATE_TEST_SUITE_P(
|
||||
+ SignatureSchemeMlDsa65Tls13, TlsSignatureSchemeConfiguration,
|
||||
+ ::testing::Combine(TlsConnectTestBase::kTlsVariantsAll,
|
||||
+ TlsConnectTestBase::kTlsV13,
|
||||
+ ::testing::Values(TlsAgent::kServerMlDsa65),
|
||||
+ ::testing::Values(ssl_auth_mldsa65),
|
||||
+ ::testing::Values(ssl_sig_mldsa65)));
|
||||
+INSTANTIATE_TEST_SUITE_P(
|
||||
+ SignatureSchemeMlDsa87Tls13, TlsSignatureSchemeConfiguration,
|
||||
+ ::testing::Combine(TlsConnectTestBase::kTlsVariantsAll,
|
||||
+ TlsConnectTestBase::kTlsV13,
|
||||
+ ::testing::Values(TlsAgent::kServerMlDsa87),
|
||||
+ ::testing::Values(ssl_auth_mldsa87),
|
||||
+ ::testing::Values(ssl_sig_mldsa87)));
|
||||
} // namespace nss_test
|
||||
diff --git a/gtests/ssl_gtest/tls_agent.h b/gtests/ssl_gtest/tls_agent.h
|
||||
--- a/gtests/ssl_gtest/tls_agent.h
|
||||
+++ b/gtests/ssl_gtest/tls_agent.h
|
||||
@@ -84,13 +84,19 @@
|
||||
static const std::string kServerEcdsa384;
|
||||
static const std::string kServerEcdsa521;
|
||||
static const std::string kServerEcdhEcdsa;
|
||||
static const std::string kServerEcdhRsa;
|
||||
static const std::string kServerDsa;
|
||||
+ static const std::string kServerMlDsa44;
|
||||
+ static const std::string kServerMlDsa65;
|
||||
+ static const std::string kServerMlDsa87;
|
||||
static const std::string kDelegatorEcdsa256; // draft-ietf-tls-subcerts
|
||||
static const std::string kDelegatorRsae2048; // draft-ietf-tls-subcerts
|
||||
static const std::string kDelegatorRsaPss2048; // draft-ietf-tls-subcerts
|
||||
+ static const std::string kDelegatorMlDsa44; // draft-ietf-tls-subcerts
|
||||
+ static const std::string kDelegatorMlDsa65; // draft-ietf-tls-subcerts
|
||||
+ static const std::string kDelegatorMlDsa87; // draft-ietf-tls-subcerts
|
||||
|
||||
TlsAgent(const std::string& name, Role role, SSLProtocolVariant variant);
|
||||
virtual ~TlsAgent();
|
||||
|
||||
void SetPeer(std::shared_ptr<TlsAgent>& peer) {
|
||||
diff --git a/gtests/ssl_gtest/tls_agent.cc b/gtests/ssl_gtest/tls_agent.cc
|
||||
--- a/gtests/ssl_gtest/tls_agent.cc
|
||||
+++ b/gtests/ssl_gtest/tls_agent.cc
|
||||
@@ -42,13 +42,19 @@
|
||||
const std::string TlsAgent::kServerEcdsa384 = "ecdsa384";
|
||||
const std::string TlsAgent::kServerEcdsa521 = "ecdsa521";
|
||||
const std::string TlsAgent::kServerEcdhRsa = "ecdh_rsa";
|
||||
const std::string TlsAgent::kServerEcdhEcdsa = "ecdh_ecdsa";
|
||||
const std::string TlsAgent::kServerDsa = "dsa";
|
||||
+const std::string TlsAgent::kServerMlDsa44 = "mldsa44";
|
||||
+const std::string TlsAgent::kServerMlDsa65 = "mldsa65";
|
||||
+const std::string TlsAgent::kServerMlDsa87 = "mldsa87";
|
||||
const std::string TlsAgent::kDelegatorEcdsa256 = "delegator_ecdsa256";
|
||||
const std::string TlsAgent::kDelegatorRsae2048 = "delegator_rsae2048";
|
||||
const std::string TlsAgent::kDelegatorRsaPss2048 = "delegator_rsa_pss2048";
|
||||
+const std::string TlsAgent::kDelegatorMlDsa44 = "delegator_mldsa44";
|
||||
+const std::string TlsAgent::kDelegatorMlDsa65 = "delegator_mldsa65";
|
||||
+const std::string TlsAgent::kDelegatorMlDsa87 = "delegator_mldsa87";
|
||||
|
||||
static const uint8_t kCannedTls13ServerHello[] = {
|
||||
0x03, 0x03, 0x9c, 0xbc, 0x14, 0x9b, 0x0e, 0x2e, 0xfa, 0x0d, 0xf3,
|
||||
0xf0, 0x5c, 0x70, 0x7a, 0xe0, 0xd1, 0x9b, 0x3e, 0x5a, 0x44, 0x6b,
|
||||
0xdf, 0xe5, 0xc2, 0x28, 0x64, 0xf7, 0x00, 0xc1, 0x9c, 0x08, 0x76,
|
||||
diff --git a/gtests/ssl_gtest/tls_subcerts_unittest.cc b/gtests/ssl_gtest/tls_subcerts_unittest.cc
|
||||
--- a/gtests/ssl_gtest/tls_subcerts_unittest.cc
|
||||
+++ b/gtests/ssl_gtest/tls_subcerts_unittest.cc
|
||||
@@ -19,10 +19,11 @@
|
||||
namespace nss_test {
|
||||
|
||||
const std::string kEcdsaDelegatorId = TlsAgent::kDelegatorEcdsa256;
|
||||
const std::string kRsaeDelegatorId = TlsAgent::kDelegatorRsae2048;
|
||||
const std::string kPssDelegatorId = TlsAgent::kDelegatorRsaPss2048;
|
||||
+const std::string kMlDsa65DelegatorId = TlsAgent::kDelegatorMlDsa65;
|
||||
const std::string kDCId = TlsAgent::kServerEcdsa256;
|
||||
const SSLSignatureScheme kDCScheme = ssl_sig_ecdsa_secp256r1_sha256;
|
||||
const PRUint32 kDCValidFor = 60 * 60 * 24 * 7 /* 1 week (seconds) */;
|
||||
|
||||
static void CheckPreliminaryPeerDelegCred(
|
||||
@@ -228,10 +229,56 @@
|
||||
EXPECT_TRUE(cfilter->captured());
|
||||
CheckPeerDelegCred(client_, true, 256);
|
||||
EXPECT_EQ(ssl_sig_ecdsa_secp256r1_sha256, client_->info().signatureScheme);
|
||||
}
|
||||
|
||||
+// Connected with ML-DSA-65, using an ML-DSA-65 SKI and ML-DSA-65 delegation
|
||||
+// cert.
|
||||
+TEST_P(TlsConnectTls13, DCConnectMlDsa65MlDsa65) {
|
||||
+ Reset(kMlDsa65DelegatorId);
|
||||
+
|
||||
+ static const SSLSignatureScheme kSchemes[] = {ssl_sig_ecdsa_secp256r1_sha256,
|
||||
+ ssl_sig_mldsa65};
|
||||
+ client_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+ server_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+
|
||||
+ client_->EnableDelegatedCredentials();
|
||||
+ server_->AddDelegatedCredential(TlsAgent::kServerMlDsa65, ssl_sig_mldsa65,
|
||||
+ kDCValidFor, now());
|
||||
+
|
||||
+ auto cfilter = MakeTlsFilter<TlsExtensionCapture>(
|
||||
+ client_, ssl_delegated_credentials_xtn);
|
||||
+ Connect();
|
||||
+
|
||||
+ EXPECT_TRUE(cfilter->captured());
|
||||
+ CheckPeerDelegCred(client_, true, ML_DSA_65_PUBLICKEY_LEN * 8);
|
||||
+ EXPECT_EQ(ssl_sig_mldsa65, client_->info().signatureScheme);
|
||||
+}
|
||||
+
|
||||
+// Connected with ECDSA-P256 using a ML-DSA-65 delegation cert.
|
||||
+TEST_P(TlsConnectTls13, DCConnectEcdsaP256MlDsa65) {
|
||||
+ Reset(kMlDsa65DelegatorId);
|
||||
+
|
||||
+ static const SSLSignatureScheme kSchemes[] = {ssl_sig_ecdsa_secp256r1_sha256,
|
||||
+ ssl_sig_mldsa65};
|
||||
+ client_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+ server_->SetSignatureSchemes(kSchemes, PR_ARRAY_SIZE(kSchemes));
|
||||
+
|
||||
+ client_->EnableDelegatedCredentials();
|
||||
+ server_->AddDelegatedCredential(TlsAgent::kServerEcdsa256,
|
||||
+ ssl_sig_ecdsa_secp256r1_sha256, kDCValidFor,
|
||||
+ now());
|
||||
+
|
||||
+ auto cfilter = MakeTlsFilter<TlsExtensionCapture>(
|
||||
+ client_, ssl_delegated_credentials_xtn);
|
||||
+ Connect();
|
||||
+
|
||||
+ EXPECT_TRUE(cfilter->captured());
|
||||
+ CheckPeerDelegCred(client_, true, 256);
|
||||
+ EXPECT_EQ(ssl_sig_ecdsa_secp256r1_sha256, client_->info().signatureScheme);
|
||||
+}
|
||||
+
|
||||
// Simulate the client receiving a DC containing algorithms not advertised.
|
||||
// Do this by tweaking the client's supported sigSchemes after the CH.
|
||||
TEST_P(TlsConnectTls13, DCReceiveUnadvertisedScheme) {
|
||||
Reset(kEcdsaDelegatorId);
|
||||
static const SSLSignatureScheme kClientSchemes[] = {
|
||||
@@ -723,8 +770,25 @@
|
||||
EXPECT_EQ(SECFailure,
|
||||
SSL_DelegateCredential(cert.get(), priv.get(), pub_ecdsa.get(),
|
||||
ssl_sig_ecdsa_secp384r1_sha384, kDCValidFor,
|
||||
now, &dc));
|
||||
EXPECT_EQ(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM, PORT_GetError());
|
||||
+ ScopedSECKEYPublicKey pub_mldsa;
|
||||
+ ScopedSECKEYPrivateKey priv_mldsa;
|
||||
+ ASSERT_TRUE(TlsAgent::LoadKeyPairFromCert(TlsAgent::kServerMlDsa65,
|
||||
+ &pub_mldsa, &priv_mldsa));
|
||||
+ EXPECT_EQ(SECFailure,
|
||||
+ SSL_DelegateCredential(cert.get(), priv.get(), pub_mldsa.get(),
|
||||
+ ssl_sig_rsa_pss_rsae_sha256, kDCValidFor,
|
||||
+ now, &dc));
|
||||
+ EXPECT_EQ(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM, PORT_GetError());
|
||||
+ EXPECT_EQ(SECFailure,
|
||||
+ SSL_DelegateCredential(cert.get(), priv.get(), pub_mldsa.get(),
|
||||
+ ssl_sig_mldsa44, kDCValidFor, now, &dc));
|
||||
+ EXPECT_EQ(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM, PORT_GetError());
|
||||
+ EXPECT_EQ(SECSuccess,
|
||||
+ SSL_DelegateCredential(cert.get(), priv.get(), pub_mldsa.get(),
|
||||
+ ssl_sig_mldsa65, kDCValidFor, now, &dc));
|
||||
+ dc.Reset();
|
||||
}
|
||||
|
||||
} // namespace nss_test
|
||||
diff --git a/tests/common/certsetup.sh b/tests/common/certsetup.sh
|
||||
--- a/tests/common/certsetup.sh
|
||||
+++ b/tests/common/certsetup.sh
|
||||
@@ -35,19 +35,43 @@
|
||||
rsa8192) type_args=(-g 8192);type=rsa ;;
|
||||
rsapss) type_args=(-g 1024 --pss);type=rsa ;;
|
||||
rsapss384) type_args=(-g 1024 --pss);type=rsa;sighash=(-Z SHA384) ;;
|
||||
rsapss512) type_args=(-g 2048 --pss);type=rsa;sighash=(-Z SHA512) ;;
|
||||
rsapss_noparam) type_args=(-g 2048 --pss);type=rsa;sighash=() ;;
|
||||
+ mldsa44) type_args=(-q ml-dsa-44);type=mldsa;sighash=() ;;
|
||||
+ mldsa65) type_args=(-q ml-dsa-65);type=mldsa;sighash=() ;;
|
||||
+ mldsa87) type_args=(-q ml-dsa-87);type=mldsa;sighash=() ;;
|
||||
p256) type_args=(-q nistp256);type=ec ;;
|
||||
p384) type_args=(-q secp384r1);type=ec ;;
|
||||
p521) type_args=(-q secp521r1);type=ec ;;
|
||||
rsa_ca) type_args=(-g 1024);trust='CT,CT,CT';type=rsa ;;
|
||||
rsa_chain) type_args=(-g 1024);sign=(-c rsa_ca);type=rsa;;
|
||||
rsapss_ca) type_args=(-g 1024 --pss);trust='CT,CT,CT';type=rsa ;;
|
||||
rsapss_chain) type_args=(-g 1024);sign=(-c rsa_pss_ca);type=rsa;;
|
||||
rsa_ca_rsapss_chain) type_args=(-g 1024 --pss-sign);sign=(-c rsa_ca);type=rsa;;
|
||||
+ mldsa44_ca) type_args=(-q ml-dsa-44);trust='CT,CT,CT';type=mldsa ;;
|
||||
+ mldsa65_ca) type_args=(-q ml-dsa-65);trust='CT,CT,CT';type=mldsa ;;
|
||||
+ mldsa87_ca) type_args=(-q ml-dsa-87);trust='CT,CT,CT';type=mldsa ;;
|
||||
+ mldsa44_chain) type_args=(-q ml-dsa-44);sign=(-c mldsa44_ca);type=mldsa;;
|
||||
+ mldsa65_chain) type_args=(-q ml-dsa-65);sign=(-c mldsa65_ca);type=mldsa;;
|
||||
+ mldsa87_chain) type_args=(-q ml-dsa-87);sign=(-c mldsa87_ca);type=mldsa;;
|
||||
ecdh_rsa) type_args=(-q nistp256);sign=(-c rsa_ca);type=ec ;;
|
||||
+ delegator_mldsa44)
|
||||
+ touch empty.txt
|
||||
+ type_args=(-q ml-dsa-44 --extGeneric 1.3.6.1.4.1.44363.44:not-critical:empty.txt)
|
||||
+ type=mldsa
|
||||
+ ;;
|
||||
+ delegator_mldsa65)
|
||||
+ touch empty.txt
|
||||
+ type_args=(-q ml-dsa-65 --extGeneric 1.3.6.1.4.1.44363.44:not-critical:empty.txt)
|
||||
+ type=mldsa
|
||||
+ ;;
|
||||
+ delegator_mldsa87)
|
||||
+ touch empty.txt
|
||||
+ type_args=(-q ml-dsa-87 --extGeneric 1.3.6.1.4.1.87363.87:not-critical:empty.txt)
|
||||
+ type=mldsa
|
||||
+ ;;
|
||||
delegator_p256)
|
||||
touch empty.txt
|
||||
type_args=(-q nistp256 --extGeneric 1.3.6.1.4.1.44363.44:not-critical:empty.txt)
|
||||
type=ec
|
||||
;;
|
||||
diff --git a/tests/ssl/ssl.sh b/tests/ssl/ssl.sh
|
||||
--- a/tests/ssl/ssl.sh
|
||||
+++ b/tests/ssl/ssl.sh
|
||||
@@ -246,34 +246,39 @@
|
||||
{
|
||||
if [ -n "$testname" ] ; then
|
||||
echo "$SCRIPTNAME: $testname ----"
|
||||
fi
|
||||
if [ -z "$NO_ECC_CERTS" -o "$NO_ECC_CERTS" != "1" ] ; then
|
||||
- ECC_OPTIONS="-e ${HOSTADDR}-ecmixed -e ${HOSTADDR}-ec"
|
||||
+ ECC_OPTIONS="-e ${HOSTADDR}-ecmixed -e ${HOSTADDR}-ec "
|
||||
else
|
||||
ECC_OPTIONS=""
|
||||
fi
|
||||
+ if [ -z "$NO_ML_DSA_CERTS" -o "$NO_ML_DSA_CERTS" != "1" ] ; then
|
||||
+ ML_DSA_OPTIONS="-e ${HOSTADDR}-ml-dsa-44 -e ${HOSTADDR}-ml-dsa-65 -e ${HOSTADDR}-ml-dsa-87 "
|
||||
+ else
|
||||
+ ML_DSA_OPTIONS=""
|
||||
+ fi
|
||||
if [ -z "$RSA_PSS_CERT" -o "$RSA_PSS_CERT" != "1" ] ; then
|
||||
RSA_OPTIONS="-n ${HOSTADDR}"
|
||||
else
|
||||
RSA_OPTIONS="-n ${HOSTADDR}-rsa-pss"
|
||||
fi
|
||||
if [ -z "$NSS_DISABLE_DSA" ]; then
|
||||
- DSA_OPTIONS="-S ${HOSTADDR}-dsa"
|
||||
+ DSA_OPTIONS="-S ${HOSTADDR}-dsa "
|
||||
else
|
||||
DSA_OPTIONS=""
|
||||
fi
|
||||
|
||||
SERVER_VMIN=${SERVER_VMIN-ssl3}
|
||||
SERVER_VMAX=${SERVER_VMAX-tls1.2}
|
||||
echo "selfserv starting at `date`"
|
||||
echo "selfserv -D -p ${PORT} -d ${P_R_SERVERDIR} ${RSA_OPTIONS} ${SERVER_OPTIONS} \\"
|
||||
- echo " ${ECC_OPTIONS} ${DSA_OPTIONS} -w nss "$@" -i ${R_SERVERPID}\\"
|
||||
+ echo " ${ECC_OPTIONS}${DSA_OPTIONS}${ML_DSA_OPTONS}-w nss "$@" -i ${R_SERVERPID}\\"
|
||||
echo " -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 &"
|
||||
if [ ${fileout} -eq 1 ]; then
|
||||
${PROFTOOL} ${BINDIR}/selfserv -D -p ${PORT} -d ${P_R_SERVERDIR} ${RSA_OPTIONS} ${SERVER_OPTIONS} \
|
||||
- ${ECC_OPTIONS} ${DSA_OPTIONS} -w nss "$@" -i ${R_SERVERPID} -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 \
|
||||
+ ${ECC_OPTIONS}${DSA_OPTIONS}${ML_DSA_OPTIONS}-w nss "$@" -i ${R_SERVERPID} -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 \
|
||||
> ${SERVEROUTFILE} 2>&1 &
|
||||
RET=$?
|
||||
else
|
||||
${PROFTOOL} ${BINDIR}/selfserv -D -p ${PORT} -d ${P_R_SERVERDIR} ${RSA_OPTIONS} ${SERVER_OPTIONS} \
|
||||
${ECC_OPTIONS} ${DSA_OPTIONS} -w nss "$@" -i ${R_SERVERPID} -V ${SERVER_VMIN}:${SERVER_VMAX} $verbose -H 1 &
|
||||
@@ -336,15 +341,24 @@
|
||||
# cygwin, which means we can't kill selfserv at the end here.
|
||||
SSL_COV_TMP=$(mktemp /tmp/ssl_cov.XXXXXX)
|
||||
ignore_blank_lines ${SSLCOV} > ${SSL_COV_TMP}
|
||||
while read ectype testmax param sig testname
|
||||
do
|
||||
- # RSA-PSS tests are handled in a separate function
|
||||
+ # Select the TLS SIG SCHEME if necessary
|
||||
+ TLS_SIG_SCHEMES=""
|
||||
if [ "$sig" = "RSA-PSS" ]; then
|
||||
+ # RSA-PSS tests are currently handled in a separate function
|
||||
continue
|
||||
+ elif [ "$sig" = "ML-DSA-44" ]; then
|
||||
+ TLS_SIG_SCHEMES="-J mldsa44 "
|
||||
+ elif [ "$sig" = "ML-DSA-65" ]; then
|
||||
+ TLS_SIG_SCHEMES="-J mldsa65 "
|
||||
+ elif [ "$sig" = "ML-DSA-87" ]; then
|
||||
+ TLS_SIG_SCHEMES="-J mldsa87 "
|
||||
fi
|
||||
|
||||
+
|
||||
# skip DSA tests if they are disabled
|
||||
if [ -n "$NSS_DISABLE_DSA" -a "$sig" = "DSA" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -388,15 +402,15 @@
|
||||
TLS_GROUPS="secp256r1mlkem768"
|
||||
elif [ "$ectype" = "MLKEM384" ]; then
|
||||
TLS_GROUPS="secp384r1mlkem1024"
|
||||
fi
|
||||
|
||||
- echo "tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I \"${TLS_GROUPS}\" -V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} \\"
|
||||
+ echo "tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I \"${TLS_GROUPS}\" ${TLS_SIG_SCHEMES}-V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} \\"
|
||||
echo " -f -d ${P_R_CLIENTDIR} $verbose -w nss < ${REQUEST_FILE}"
|
||||
|
||||
rm ${TMP}/$HOST.tmp.$$ 2>/dev/null
|
||||
- ${PROFTOOL} ${BINDIR}/tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I "${TLS_GROUPS}" -V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} -f \
|
||||
+ ${PROFTOOL} ${BINDIR}/tstclnt -4 -p ${PORT} -h ${HOSTADDR} -c ${param} -I "${TLS_GROUPS}" ${TLS_SIG_SCHEMES}-V ${VMIN}:${VMAX} ${CLIENT_OPTIONS} -f \
|
||||
-d ${P_R_CLIENTDIR} $verbose -w nss < ${REQUEST_FILE} \
|
||||
>${TMP}/$HOST.tmp.$$ 2>&1
|
||||
ret=$?
|
||||
cat ${TMP}/$HOST.tmp.$$
|
||||
rm ${TMP}/$HOST.tmp.$$ 2>/dev/null
|
||||
diff --git a/tests/ssl/sslauth.txt b/tests/ssl/sslauth.txt
|
||||
--- a/tests/ssl/sslauth.txt
|
||||
+++ b/tests/ssl/sslauth.txt
|
||||
@@ -80,5 +80,23 @@
|
||||
SNI 0 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-w_nss_-n_TestUser TLS Server hello response without SNI
|
||||
SNI 0 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-c_v_-w_nss_-n_TestUser_-a_Host-sni.Dom TLS Server hello response with SNI
|
||||
SNI 1 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-w_nss_-n_TestUser_-a_Host-sni.Dom_-a_Host.Dom TLS Server hello response with SNI: Change name on 2d HS
|
||||
SNI 1 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-c_v_-w_nss_-n_TestUser_-a_Host-sni.Dom_-a_Host-sni1.Dom TLS Server hello response with SNI: Change name to invalid 2d HS
|
||||
SNI 1 -r_-r_-r_-a_Host-sni.Dom -V_ssl3:tls1.2_-c_v_-w_nss_-n_TestUser_-a_Host-sni1.Dom TLS Server response with alert
|
||||
+#
|
||||
+# ML-DSA Tests
|
||||
+#
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-44_-w_nss TLS 1.3 ML-DSA-44 Request don't require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-44_-w_nss TLS 1.3 ML-DSA-44 Require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-44 Request don't require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 1 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-44 Require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 0 -r_-r_-r_-E_-u -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-44_-w_nss TLS 1.3 ML-DSA-44 Request don't require client auth on post hs with session ticket (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-65_-w_nss TLS 1.3 ML-DSA-65 Request don't require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-65_-w_nss TLS 1.3 ML-DSA-65 Require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-65 Request don't require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 1 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-65 Require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 0 -r_-r_-r_-E_-u -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-65_-w_nss TLS 1.3 ML-DSA-65 Request don't require client auth on post hs with session ticket (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-87_-w_nss TLS 1.3 ML-DSA-87 Request don't require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-87_-w_nss TLS 1.3 ML-DSA-87 Require client auth on post hs (client auth)
|
||||
+MLDSA 0 -r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-87 Request don't require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 1 -r_-r_-r_-r_-E -V_tls1.3:tls1.3_-E_-n_none_-w_nss TLS 1.3 ML-DSA-87 Require client auth on post hs (client does not provide auth)
|
||||
+MLDSA 0 -r_-r_-r_-E_-u -V_tls1.3:tls1.3_-E_-n_TestUser-ml-dsa-87_-w_nss TLS 1.3 ML-DSA-87 Request don't require client auth on post hs with session ticket (client auth)
|
||||
diff --git a/tests/ssl/sslcov.txt b/tests/ssl/sslcov.txt
|
||||
--- a/tests/ssl/sslcov.txt
|
||||
+++ b/tests/ssl/sslcov.txt
|
||||
@@ -154,9 +154,15 @@
|
||||
MLKEM256 TLS13 :1302 ECC TLS13_SECP256R1MLKEM768_WITH_AES_256_GCM_SHA384
|
||||
MLKEM256 TLS13 :1303 ECC TLS13_SECP256R1MLKEM768_WITH_CHACHA20_POLY1305_SHA256
|
||||
MLKEM384 TLS13 :1301 ECC TLS13_SECP384R1MLKEM1024_WITH_AES_128_GCM_SHA256
|
||||
MLKEM384 TLS13 :1302 ECC TLS13_SECP384R1MLKEM1024_WITH_AES_256_GCM_SHA384
|
||||
MLKEM384 TLS13 :1303 ECC TLS13_SECP384R1MLKEM1024_WITH_CHACHA20_POLY1305_SHA256
|
||||
+ ECC TLS13 :1301 ML_DSA_44 TLS13_ECDHE_WITH_AES_128_GCM_SHA256 (ML_DSA_44)
|
||||
+ ECC TLS13 :1302 ML_DSA_65 TLS13_ECDHE_WITH_AES_256_GCM_SHA384 (ML_DSA_65)
|
||||
+ ECC TLS13 :1303 ML_DSA_87 TLS13_ECDHE_WITH_CHACHA20_POLY1305_SHA256 (ML_DSA_87)
|
||||
+MLKEM219 TLS13 :1301 ML_DSA_65 TLS13_MLKEM768X25519_WITH_AES_128_GCM_SHA256 (ML_DSA_65)
|
||||
+MLKEM219 TLS13 :1302 ML_DSA_87 TLS13_MLKEM768X25519_WITH_AES_256_GCM_SHA384 (ML_DSA_87)
|
||||
+MLKEM219 TLS13 :1303 ML_DSA_44 TLS13_MLKEM768X25519_WITH_CHACHA20_POLY1305_SHA256 (ML_DSA_44)
|
||||
# need to turn on policy in selfserv/tstclnt to make these work
|
||||
#XYBER TLS13 :1301 ECC TLS13_XYBER768D00_WITH_AES_128_GCM_SHA256
|
||||
#XYBER TLS13 :1302 ECC TLS13_XYBER768D00_WITH_AES_256_GCM_SHA384
|
||||
#XYBER TLS13 :1303 ECC TLS13_XYBER768D00_WITH_CHACHA20_POLY1305_SHA256
|
||||
diff --git a/tests/ssl_gtests/ssl_gtests.sh b/tests/ssl_gtests/ssl_gtests.sh
|
||||
--- a/tests/ssl_gtests/ssl_gtests.sh
|
||||
+++ b/tests/ssl_gtests/ssl_gtests.sh
|
||||
@@ -47,23 +47,35 @@
|
||||
make_cert rsa_pss_noparam rsapss_noparam sign
|
||||
make_cert rsa_decrypt rsa kex
|
||||
make_cert ecdsa256 p256 sign
|
||||
make_cert ecdsa384 p384 sign
|
||||
make_cert ecdsa521 p521 sign
|
||||
+ make_cert mldsa44 mldsa44 sign
|
||||
+ make_cert mldsa65 mldsa65 sign
|
||||
+ make_cert mldsa87 mldsa87 sign
|
||||
make_cert ecdh_ecdsa p256 kex
|
||||
make_cert rsa_ca rsa_ca ca
|
||||
make_cert rsa_chain rsa_chain sign
|
||||
make_cert rsa_pss_ca rsapss_ca ca
|
||||
make_cert rsa_pss_chain rsapss_chain sign
|
||||
make_cert rsa_ca_rsa_pss_chain rsa_ca_rsapss_chain sign
|
||||
+ make_cert mldsa44_ca mldsa44_ca ca
|
||||
+ make_cert mldsa44_chain mldsa44_chain sign
|
||||
+ make_cert mldsa65_ca mldsa65_ca ca
|
||||
+ make_cert mldsa65_chain mldsa65_chain sign
|
||||
+ make_cert mldsa87_ca mldsa87_ca ca
|
||||
+ make_cert mldsa87_chain mldsa87_chain sign
|
||||
make_cert ecdh_rsa ecdh_rsa kex
|
||||
if [ -z "${NSS_DISABLE_DSA}" ]; then
|
||||
make_cert dsa dsa sign
|
||||
fi
|
||||
make_cert delegator_ecdsa256 delegator_p256 sign
|
||||
make_cert delegator_rsae2048 delegator_rsae2048 sign
|
||||
make_cert delegator_rsa_pss2048 delegator_rsa_pss2048 sign
|
||||
+ make_cert delegator_mldsa44 delegator_mldsa44 sign
|
||||
+ make_cert delegator_mldsa65 delegator_mldsa65 sign
|
||||
+ make_cert delegator_mldsa87 delegator_mldsa87 sign
|
||||
}
|
||||
|
||||
############################## ssl_gtest_init ##########################
|
||||
# local shell function to initialize this script
|
||||
########################################################################
|
||||
|
||||
|
||||
|
|
@ -1,642 +0,0 @@
|
|||
diff --git a/automation/abi-check/expected-report-libssl3.so.txt b/automation/abi-check/expected-report-libssl3.so.txt
|
||||
--- a/automation/abi-check/expected-report-libssl3.so.txt
|
||||
+++ b/automation/abi-check/expected-report-libssl3.so.txt
|
||||
@@ -0,0 +1,24 @@
|
||||
+
|
||||
+1 function with some indirect sub-type change:
|
||||
+
|
||||
+ [C]'function SECStatus SSL_ConfigServerCert(PRFileDesc*, CERTCertificate*, SECKEYPrivateKey*, const SSLExtraServerCertData*, unsigned int)' at sslcert.c:662:1 has some indirect sub-type changes:
|
||||
+ parameter 4 of type 'const SSLExtraServerCertData*' has sub-type changes:
|
||||
+ in pointed to type 'const SSLExtraServerCertData':
|
||||
+ in unqualified underlying type 'typedef SSLExtraServerCertData' at sslt.h:310:1:
|
||||
+ underlying type 'struct SSLExtraServerCertDataStr' at sslt.h:269:1 changed:
|
||||
+ type size hasn't changed
|
||||
+ 1 data member change:
|
||||
+ type of 'SSLAuthType SSLExtraServerCertDataStr::authType' changed:
|
||||
+ underlying type 'enum __anonymous_enum__' at sslt.h:176:1 changed:
|
||||
+ type size hasn't changed
|
||||
+ 3 enumerator insertions:
|
||||
+ '__anonymous_enum__::ssl_auth_mldsa44' value '11'
|
||||
+ '__anonymous_enum__::ssl_auth_mldsa65' value '12'
|
||||
+ '__anonymous_enum__::ssl_auth_mldsa87' value '13'
|
||||
+
|
||||
+ 1 enumerator change:
|
||||
+ '__anonymous_enum__::ssl_auth_size' from value '11' to '14' at sslt.h:180:1
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c
|
||||
--- a/lib/ssl/ssl3con.c
|
||||
+++ b/lib/ssl/ssl3con.c
|
||||
@@ -69,10 +69,11 @@
|
||||
static CK_MECHANISM_TYPE ssl3_GetMgfMechanismByHashType(SSLHashType hash);
|
||||
PRBool ssl_IsRsaPssSignatureScheme(SSLSignatureScheme scheme);
|
||||
PRBool ssl_IsRsaeSignatureScheme(SSLSignatureScheme scheme);
|
||||
PRBool ssl_IsRsaPkcs1SignatureScheme(SSLSignatureScheme scheme);
|
||||
PRBool ssl_IsDsaSignatureScheme(SSLSignatureScheme scheme);
|
||||
+PRBool ssl_IsMldsaSignatureScheme(SSLSignatureScheme scheme);
|
||||
static SECStatus ssl3_UpdateDefaultHandshakeHashes(sslSocket *ss,
|
||||
const unsigned char *b,
|
||||
unsigned int l);
|
||||
const PRUint32 kSSLSigSchemePolicy =
|
||||
NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_ANY_SIGNATURE;
|
||||
@@ -203,11 +204,14 @@
|
||||
ssl_sig_rsa_pkcs1_sha512,
|
||||
ssl_sig_rsa_pkcs1_sha1,
|
||||
ssl_sig_dsa_sha256,
|
||||
ssl_sig_dsa_sha384,
|
||||
ssl_sig_dsa_sha512,
|
||||
- ssl_sig_dsa_sha1
|
||||
+ ssl_sig_dsa_sha1,
|
||||
+ ssl_sig_mldsa44,
|
||||
+ ssl_sig_mldsa65,
|
||||
+ ssl_sig_mldsa87,
|
||||
};
|
||||
PR_STATIC_ASSERT(PR_ARRAY_SIZE(defaultSignatureSchemes) <=
|
||||
MAX_SIGNATURE_SCHEMES);
|
||||
|
||||
/* Verify that SSL_ImplementedCiphers and cipherSuites are in consistent order.
|
||||
@@ -361,11 +365,14 @@
|
||||
CKM_ECDH1_DERIVE, /* ssl_auth_ecdh_rsa */
|
||||
CKM_ECDH1_DERIVE, /* ssl_auth_ecdh_ecdsa */
|
||||
CKM_RSA_PKCS, /* ssl_auth_rsa_sign */
|
||||
CKM_RSA_PKCS_PSS, /* ssl_auth_rsa_pss */
|
||||
CKM_HKDF_DATA, /* ssl_auth_psk (just check for HKDF) */
|
||||
- CKM_INVALID_MECHANISM /* ssl_auth_tls13_any */
|
||||
+ CKM_INVALID_MECHANISM, /* ssl_auth_tls13_any */
|
||||
+ CKM_ML_DSA, /* ssl_auth_mldsa44 */
|
||||
+ CKM_ML_DSA, /* ssl_auth_mldsa65 */
|
||||
+ CKM_ML_DSA, /* ssl_auth_mldsa87 */
|
||||
};
|
||||
PR_STATIC_ASSERT(PR_ARRAY_SIZE(auth_alg_defs) == ssl_auth_size);
|
||||
|
||||
static const CK_MECHANISM_TYPE kea_alg_defs[] = {
|
||||
CKM_INVALID_MECHANISM, /* ssl_kea_null */
|
||||
@@ -917,10 +924,18 @@
|
||||
{
|
||||
PRCList *cursor;
|
||||
if (authType == ssl_auth_null || authType == ssl_auth_psk || authType == ssl_auth_tls13_any) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
+ /* mldsa is only supported in TLS 1.3 or greater */
|
||||
+ if (maxVersion < SSL_LIBRARY_VERSION_TLS_1_3 &&
|
||||
+ (authType == ssl_auth_mldsa44 ||
|
||||
+ authType == ssl_auth_mldsa65 ||
|
||||
+ authType == ssl_auth_mldsa87)) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+
|
||||
for (cursor = PR_NEXT_LINK(&ss->serverCerts);
|
||||
cursor != &ss->serverCerts;
|
||||
cursor = PR_NEXT_LINK(cursor)) {
|
||||
sslServerCert *cert = (sslServerCert *)cursor;
|
||||
if (!cert->serverKeyPair ||
|
||||
@@ -989,19 +1004,28 @@
|
||||
}
|
||||
|
||||
/* Check that a signature scheme is accepted.
|
||||
* Both by policy and by having a token that supports it. */
|
||||
static PRBool
|
||||
-ssl_SignatureSchemeAccepted(PRUint16 minVersion,
|
||||
+ssl_SignatureSchemeAccepted(PRUint16 maxVersion,
|
||||
+ PRUint16 minVersion,
|
||||
SSLSignatureScheme scheme,
|
||||
PRBool forCert)
|
||||
{
|
||||
/* Disable RSA-PSS schemes if there are no tokens to verify them. */
|
||||
if (ssl_IsRsaPssSignatureScheme(scheme)) {
|
||||
if (!PK11_TokenExists(auth_alg_defs[ssl_auth_rsa_pss])) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
+ } else if (ssl_IsMldsaSignatureScheme(scheme)) {
|
||||
+ /* ML-DSA: only in TLS 1.3 and later. */
|
||||
+ if (maxVersion < SSL_LIBRARY_VERSION_TLS_1_3) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+ if (!PK11_TokenExists(auth_alg_defs[ssl_auth_mldsa44])) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
} else if (!forCert && ssl_IsRsaPkcs1SignatureScheme(scheme)) {
|
||||
/* Disable PKCS#1 signatures if we are limited to TLS 1.3.
|
||||
* We still need to advertise PKCS#1 signatures in CH and CR
|
||||
* for certificate signatures.
|
||||
*/
|
||||
@@ -1046,11 +1070,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure that there is a signature scheme that can be accepted.*/
|
||||
for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
|
||||
- if (ssl_SignatureSchemeAccepted(ss->vrange.min,
|
||||
+ if (ssl_SignatureSchemeAccepted(ss->vrange.max, ss->vrange.min,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
PR_FALSE /* forCert */)) {
|
||||
return SECSuccess;
|
||||
}
|
||||
}
|
||||
@@ -1077,11 +1101,12 @@
|
||||
SSLSignatureScheme scheme = ss->ssl3.signatureSchemes[i];
|
||||
SSLAuthType schemeAuthType = ssl_SignatureSchemeToAuthType(scheme);
|
||||
PRBool acceptable = authType == schemeAuthType ||
|
||||
(schemeAuthType == ssl_auth_rsa_pss &&
|
||||
authType == ssl_auth_rsa_sign);
|
||||
- if (acceptable && ssl_SignatureSchemeAccepted(ss->version, scheme, PR_FALSE /* forCert */)) {
|
||||
+ if (acceptable && ssl_SignatureSchemeAccepted(ss->version, ss->version,
|
||||
+ scheme, PR_FALSE /* forCert */)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
@@ -3569,10 +3594,11 @@
|
||||
case ssl_hash_none:
|
||||
/* ssl_hash_none is for pre-1.2 suites, which use SHA-256. */
|
||||
return CKM_SHA256;
|
||||
case ssl_hash_sha1:
|
||||
return CKM_SHA_1;
|
||||
+ /* don't return a mechansim for ml_dsa hashes */
|
||||
default:
|
||||
PORT_Assert(0);
|
||||
}
|
||||
return CKM_SHA256;
|
||||
}
|
||||
@@ -4525,10 +4551,16 @@
|
||||
return SEC_OID_PKCS1_RSA_PSS_SIGNATURE;
|
||||
case ssl_auth_ecdsa:
|
||||
return SEC_OID_ANSIX962_EC_PUBLIC_KEY;
|
||||
case ssl_auth_dsa:
|
||||
return SEC_OID_ANSIX9_DSA_SIGNATURE;
|
||||
+ case ssl_auth_mldsa44:
|
||||
+ return SEC_OID_ML_DSA_44;
|
||||
+ case ssl_auth_mldsa65:
|
||||
+ return SEC_OID_ML_DSA_65;
|
||||
+ case ssl_auth_mldsa87:
|
||||
+ return SEC_OID_ML_DSA_87;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* shouldn't ever get there */
|
||||
PORT_Assert(0);
|
||||
@@ -4561,10 +4593,14 @@
|
||||
case ssl_sig_rsa_pss_pss_sha512:
|
||||
case ssl_sig_dsa_sha512:
|
||||
return ssl_hash_sha512;
|
||||
case ssl_sig_rsa_pkcs1_sha1md5:
|
||||
return ssl_hash_none; /* Special for TLS 1.0/1.1. */
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ return ssl_hash_none; /* ml_dsa does no hashing */
|
||||
case ssl_sig_none:
|
||||
case ssl_sig_ed25519:
|
||||
case ssl_sig_ed448:
|
||||
break;
|
||||
}
|
||||
@@ -4613,14 +4649,38 @@
|
||||
return PR_FALSE;
|
||||
}
|
||||
/* With TLS 1.3, EC keys should have been selected based on calling
|
||||
* ssl_SignatureSchemeFromSpki(), reject them otherwise. */
|
||||
return spkiOid != SEC_OID_ANSIX962_EC_PUBLIC_KEY;
|
||||
+ } else {
|
||||
+ if (ssl_IsMldsaSignatureScheme(scheme)) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
+/* some schmemes match 1 for 1 to oids, for those schemes, we
|
||||
+ * can return the oid directly. If this function return ssl_sig_none,
|
||||
+ * it means the oid doesn't match a scheme or matches more than one
|
||||
+ * scheme */
|
||||
+SSLSignatureScheme
|
||||
+ssl_SignatureSchemeFromPublicKeyOid(SECOidTag tag)
|
||||
+{
|
||||
+ switch (tag) {
|
||||
+ case SEC_OID_ML_DSA_44:
|
||||
+ return ssl_sig_mldsa44;
|
||||
+ case SEC_OID_ML_DSA_65:
|
||||
+ return ssl_sig_mldsa65;
|
||||
+ case SEC_OID_ML_DSA_87:
|
||||
+ return ssl_sig_mldsa87;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ return ssl_sig_none;
|
||||
+}
|
||||
+
|
||||
static SECStatus
|
||||
ssl_SignatureSchemeFromPssSpki(const CERTSubjectPublicKeyInfo *spki,
|
||||
SSLSignatureScheme *scheme)
|
||||
{
|
||||
SECKEYRSAPSSParams pssParam = { 0 };
|
||||
@@ -4709,22 +4769,27 @@
|
||||
ssl_SignatureSchemeFromSpki(const CERTSubjectPublicKeyInfo *spki,
|
||||
PRBool isTls13, SSLSignatureScheme *scheme)
|
||||
{
|
||||
SECOidTag spkiOid = SECOID_GetAlgorithmTag(&spki->algorithm);
|
||||
|
||||
- if (spkiOid == SEC_OID_PKCS1_RSA_PSS_SIGNATURE) {
|
||||
- return ssl_SignatureSchemeFromPssSpki(spki, scheme);
|
||||
- }
|
||||
-
|
||||
- /* Only do this lookup for TLS 1.3, where the scheme can be determined from
|
||||
- * the SPKI alone because the ECDSA key size determines the hash. Earlier
|
||||
- * TLS versions allow the same EC key to be used with different hashes. */
|
||||
- if (isTls13 && spkiOid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
|
||||
- return ssl_SignatureSchemeFromEcSpki(spki, scheme);
|
||||
- }
|
||||
-
|
||||
*scheme = ssl_sig_none;
|
||||
+ switch (spkiOid) {
|
||||
+ case SEC_OID_PKCS1_RSA_PSS_SIGNATURE:
|
||||
+ return ssl_SignatureSchemeFromPssSpki(spki, scheme);
|
||||
+ case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
|
||||
+ /* Only do this lookup for TLS 1.3, where the scheme can be
|
||||
+ * determined from the SPKI alone because the ECDSA key size
|
||||
+ * determines the hash. Earlier TLS versions allow the same
|
||||
+ * EC key to be used with different hashes. */
|
||||
+ if (isTls13) {
|
||||
+ return ssl_SignatureSchemeFromEcSpki(spki, scheme);
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ *scheme = ssl_SignatureSchemeFromPublicKeyOid(spkiOid);
|
||||
+ break;
|
||||
+ }
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
/* Check that a signature scheme is enabled by configuration. */
|
||||
PRBool
|
||||
@@ -4826,10 +4891,13 @@
|
||||
case ssl_sig_rsa_pss_pss_sha384:
|
||||
case ssl_sig_rsa_pss_pss_sha512:
|
||||
case ssl_sig_ecdsa_secp256r1_sha256:
|
||||
case ssl_sig_ecdsa_secp384r1_sha384:
|
||||
case ssl_sig_ecdsa_secp521r1_sha512:
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ case ssl_sig_mldsa87:
|
||||
case ssl_sig_dsa_sha1:
|
||||
case ssl_sig_dsa_sha256:
|
||||
case ssl_sig_dsa_sha384:
|
||||
case ssl_sig_dsa_sha512:
|
||||
case ssl_sig_ecdsa_sha1:
|
||||
@@ -4908,10 +4976,25 @@
|
||||
return PR_FALSE;
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
+PRBool
|
||||
+ssl_IsMldsaSignatureScheme(SSLSignatureScheme scheme)
|
||||
+{
|
||||
+ switch (scheme) {
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ return PR_TRUE;
|
||||
+
|
||||
+ default:
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+ return PR_FALSE;
|
||||
+}
|
||||
+
|
||||
SSLAuthType
|
||||
ssl_SignatureSchemeToAuthType(SSLSignatureScheme scheme)
|
||||
{
|
||||
switch (scheme) {
|
||||
case ssl_sig_rsa_pkcs1_sha1:
|
||||
@@ -4936,10 +5019,21 @@
|
||||
case ssl_sig_dsa_sha1:
|
||||
case ssl_sig_dsa_sha256:
|
||||
case ssl_sig_dsa_sha384:
|
||||
case ssl_sig_dsa_sha512:
|
||||
return ssl_auth_dsa;
|
||||
+ /* while there is one mechanism for ML-DSA,
|
||||
+ * server cert selection depends on which
|
||||
+ * flavor (paramset) is being used, so
|
||||
+ * we need one auth foreach param set.
|
||||
+ */
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ return ssl_auth_mldsa44;
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ return ssl_auth_mldsa65;
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ return ssl_auth_mldsa87;
|
||||
|
||||
default:
|
||||
PORT_Assert(0);
|
||||
}
|
||||
return ssl_auth_null;
|
||||
@@ -10490,17 +10584,18 @@
|
||||
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
SECStatus
|
||||
-ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool forCert,
|
||||
- PRBool grease, sslBuffer *buf)
|
||||
+ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 maxVersion, PRUint16 minVersion,
|
||||
+ PRBool forCert, PRBool grease, sslBuffer *buf)
|
||||
{
|
||||
SSLSignatureScheme filtered[MAX_SIGNATURE_SCHEMES] = { 0 };
|
||||
unsigned int filteredCount = 0;
|
||||
|
||||
- SECStatus rv = ssl3_FilterSigAlgs(ss, minVersion, PR_FALSE, forCert,
|
||||
+ SECStatus rv = ssl3_FilterSigAlgs(ss, maxVersion, minVersion,
|
||||
+ PR_FALSE, forCert,
|
||||
PR_ARRAY_SIZE(filtered),
|
||||
filtered, &filteredCount);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
@@ -10573,12 +10668,12 @@
|
||||
* requires that PKCS#1 schemes are placed last in the list if they
|
||||
* are present. This sorting can be removed once we support
|
||||
* signature_algorithms_cert.
|
||||
*/
|
||||
SECStatus
|
||||
-ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool disableRsae,
|
||||
- PRBool forCert,
|
||||
+ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 maxVersion, PRUint16 minVersion,
|
||||
+ PRBool disableRsae, PRBool forCert,
|
||||
unsigned int maxSchemes, SSLSignatureScheme *filteredSchemes,
|
||||
unsigned int *numFilteredSchemes)
|
||||
{
|
||||
PORT_Assert(filteredSchemes);
|
||||
PORT_Assert(numFilteredSchemes);
|
||||
@@ -10591,25 +10686,25 @@
|
||||
PRBool allowUnsortedPkcs1 = forCert && minVersion < SSL_LIBRARY_VERSION_TLS_1_3;
|
||||
for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
|
||||
if (disableRsae && ssl_IsRsaeSignatureScheme(ss->ssl3.signatureSchemes[i])) {
|
||||
continue;
|
||||
}
|
||||
- if (ssl_SignatureSchemeAccepted(minVersion,
|
||||
+ if (ssl_SignatureSchemeAccepted(maxVersion, minVersion,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
allowUnsortedPkcs1)) {
|
||||
filteredSchemes[(*numFilteredSchemes)++] = ss->ssl3.signatureSchemes[i];
|
||||
}
|
||||
}
|
||||
if (forCert && !allowUnsortedPkcs1) {
|
||||
for (unsigned int i = 0; i < ss->ssl3.signatureSchemeCount; ++i) {
|
||||
if (disableRsae && ssl_IsRsaeSignatureScheme(ss->ssl3.signatureSchemes[i])) {
|
||||
continue;
|
||||
}
|
||||
- if (!ssl_SignatureSchemeAccepted(minVersion,
|
||||
+ if (!ssl_SignatureSchemeAccepted(maxVersion, minVersion,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
PR_FALSE) &&
|
||||
- ssl_SignatureSchemeAccepted(minVersion,
|
||||
+ ssl_SignatureSchemeAccepted(maxVersion, minVersion,
|
||||
ss->ssl3.signatureSchemes[i],
|
||||
PR_TRUE)) {
|
||||
filteredSchemes[(*numFilteredSchemes)++] = ss->ssl3.signatureSchemes[i];
|
||||
}
|
||||
}
|
||||
@@ -10648,11 +10743,11 @@
|
||||
certTypes = certificate_types;
|
||||
certTypesLength = sizeof certificate_types;
|
||||
|
||||
length = 1 + certTypesLength + 2 + calen;
|
||||
if (isTLS12) {
|
||||
- rv = ssl3_EncodeSigAlgs(ss, ss->version, PR_TRUE /* forCert */,
|
||||
+ rv = ssl3_EncodeSigAlgs(ss, ss->version, ss->version, PR_TRUE /* forCert */,
|
||||
PR_FALSE /* GREASE */, &sigAlgsBuf);
|
||||
if (rv != SECSuccess) {
|
||||
return rv;
|
||||
}
|
||||
length += SSL_BUFFER_LEN(&sigAlgsBuf);
|
||||
@@ -11854,10 +11949,15 @@
|
||||
/* Don't check EC strength here on the understanding that we
|
||||
* only support curves we like. */
|
||||
minKey = ss->sec.authKeyBits;
|
||||
}
|
||||
break;
|
||||
+ case mldsaKey:
|
||||
+ /* ML DSA has fixed sizes per param set and are handled by
|
||||
+ * separate policy oids for each param set */
|
||||
+ minKey = ss->sec.authKeyBits;
|
||||
+ break;
|
||||
|
||||
default:
|
||||
FATAL_ERROR(ss, SEC_ERROR_LIBRARY_FAILURE, internal_error);
|
||||
return SECFailure;
|
||||
}
|
||||
diff --git a/lib/ssl/ssl3exthandle.c b/lib/ssl/ssl3exthandle.c
|
||||
--- a/lib/ssl/ssl3exthandle.c
|
||||
+++ b/lib/ssl/ssl3exthandle.c
|
||||
@@ -1653,17 +1653,21 @@
|
||||
if (ss->vrange.max < SSL_LIBRARY_VERSION_TLS_1_2) {
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
PRUint16 minVersion;
|
||||
+ PRUint16 maxVersion;
|
||||
if (ss->sec.isServer) {
|
||||
+ maxVersion = ss->version; /* CertificateRequest */
|
||||
minVersion = ss->version; /* CertificateRequest */
|
||||
} else {
|
||||
+ maxVersion = ss->vrange.max; /* ClientHello */
|
||||
minVersion = ss->vrange.min; /* ClientHello */
|
||||
}
|
||||
|
||||
- SECStatus rv = ssl3_EncodeSigAlgs(ss, minVersion, PR_TRUE /* forCert */,
|
||||
+ SECStatus rv = ssl3_EncodeSigAlgs(ss, maxVersion, minVersion,
|
||||
+ PR_TRUE /* forCert */,
|
||||
ss->opt.enableGrease, buf);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
diff --git a/lib/ssl/sslcert.c b/lib/ssl/sslcert.c
|
||||
--- a/lib/ssl/sslcert.c
|
||||
+++ b/lib/ssl/sslcert.c
|
||||
@@ -568,10 +568,27 @@
|
||||
if (cert->keyUsage & KU_KEY_ENCIPHERMENT) {
|
||||
authTypes |= 1 << ssl_GetEcdhAuthType(cert);
|
||||
}
|
||||
break;
|
||||
|
||||
+ case SEC_OID_ML_DSA_44:
|
||||
+ if (cert->keyUsage & KU_DIGITAL_SIGNATURE) {
|
||||
+ authTypes |= 1 << ssl_auth_mldsa44;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case SEC_OID_ML_DSA_65:
|
||||
+ if (cert->keyUsage & KU_DIGITAL_SIGNATURE) {
|
||||
+ authTypes |= 1 << ssl_auth_mldsa65;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case SEC_OID_ML_DSA_87:
|
||||
+ if (cert->keyUsage & KU_DIGITAL_SIGNATURE) {
|
||||
+ authTypes |= 1 << ssl_auth_mldsa87;
|
||||
+ }
|
||||
+
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check that we successfully picked an authType */
|
||||
@@ -729,10 +746,19 @@
|
||||
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
|
||||
mask |= 1 << ssl_auth_ecdsa;
|
||||
mask |= 1 << ssl_auth_ecdh_rsa;
|
||||
mask |= 1 << ssl_auth_ecdh_ecdsa;
|
||||
break;
|
||||
+ case SEC_OID_ML_DSA_44:
|
||||
+ mask |= 1 << ssl_auth_mldsa44;
|
||||
+ break;
|
||||
+ case SEC_OID_ML_DSA_65:
|
||||
+ mask |= 1 << ssl_auth_mldsa65;
|
||||
+ break;
|
||||
+ case SEC_OID_ML_DSA_87:
|
||||
+ mask |= 1 << ssl_auth_mldsa87;
|
||||
+ break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
PORT_Assert(authTypes);
|
||||
/* Simply test that no inappropriate auth types are set. */
|
||||
diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h
|
||||
--- a/lib/ssl/sslimpl.h
|
||||
+++ b/lib/ssl/sslimpl.h
|
||||
@@ -1746,16 +1746,18 @@
|
||||
SECStatus ssl_SetAuthKeyBits(sslSocket *ss, const SECKEYPublicKey *pubKey);
|
||||
SECStatus ssl3_HandleServerSpki(sslSocket *ss);
|
||||
SECStatus ssl3_AuthCertificate(sslSocket *ss);
|
||||
SECStatus ssl_ReadCertificateStatus(sslSocket *ss, PRUint8 *b,
|
||||
PRUint32 length);
|
||||
-SECStatus ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool forCert,
|
||||
+SECStatus ssl3_EncodeSigAlgs(const sslSocket *ss, PRUint16 maxVersion,
|
||||
+ PRUint16 minVersion, PRBool forCert,
|
||||
PRBool grease, sslBuffer *buf);
|
||||
SECStatus ssl3_EncodeFilteredSigAlgs(const sslSocket *ss,
|
||||
const SSLSignatureScheme *schemes,
|
||||
PRUint32 numSchemes, PRBool grease, sslBuffer *buf);
|
||||
-SECStatus ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 minVersion, PRBool disableRsae, PRBool forCert,
|
||||
+SECStatus ssl3_FilterSigAlgs(const sslSocket *ss, PRUint16 maxVersion, PRUint16 minVersion,
|
||||
+ PRBool disableRsae, PRBool forCert,
|
||||
unsigned int maxSchemes, SSLSignatureScheme *filteredSchemes,
|
||||
unsigned int *numFilteredSchemes);
|
||||
SECStatus ssl_GetCertificateRequestCAs(const sslSocket *ss,
|
||||
unsigned int *calenp,
|
||||
const SECItem **namesp,
|
||||
@@ -1821,10 +1823,11 @@
|
||||
SECStatus ssl_InsertRecordHeader(const sslSocket *ss, ssl3CipherSpec *cwSpec,
|
||||
SSLContentType contentType, sslBuffer *wrBuf,
|
||||
PRBool *needsLength);
|
||||
PRBool ssl_SignatureSchemeValid(SSLSignatureScheme scheme, SECOidTag spkiOid,
|
||||
PRBool isTls13);
|
||||
+SSLSignatureScheme ssl_SignatureSchemeFromPublicKeyOid(SECOidTag tag);
|
||||
|
||||
/* Pull in DTLS functions */
|
||||
#include "dtlscon.h"
|
||||
|
||||
/* Pull in TLS 1.3 functions */
|
||||
diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h
|
||||
--- a/lib/ssl/sslt.h
|
||||
+++ b/lib/ssl/sslt.h
|
||||
@@ -154,10 +154,14 @@
|
||||
ssl_sig_dsa_sha256 = 0x0402,
|
||||
ssl_sig_dsa_sha384 = 0x0502,
|
||||
ssl_sig_dsa_sha512 = 0x0602,
|
||||
ssl_sig_ecdsa_sha1 = 0x0203,
|
||||
|
||||
+ ssl_sig_mldsa44 = 0x0904,
|
||||
+ ssl_sig_mldsa65 = 0x0905,
|
||||
+ ssl_sig_mldsa87 = 0x0906,
|
||||
+
|
||||
/* The following value (which can't be used in the protocol), represents
|
||||
* the RSA signature using SHA-1 and MD5 that is used in TLS 1.0 and 1.1.
|
||||
* This is reported as a signature scheme when TLS 1.0 or 1.1 is used.
|
||||
* This should not be passed to SSL_SignatureSchemePrefSet(); this
|
||||
* signature scheme is always used and cannot be disabled. */
|
||||
@@ -183,10 +187,13 @@
|
||||
ssl_auth_ecdh_ecdsa = 6, /* ECDH cert with an ECDSA signature. */
|
||||
ssl_auth_rsa_sign = 7, /* RSA signing with an rsaEncryption key. */
|
||||
ssl_auth_rsa_pss = 8, /* RSA signing with a PSS key. */
|
||||
ssl_auth_psk = 9,
|
||||
ssl_auth_tls13_any = 10,
|
||||
+ ssl_auth_mldsa44 = 11, /* use separate auth for each paramset */
|
||||
+ ssl_auth_mldsa65 = 12, /* so we can properly identify the certs */
|
||||
+ ssl_auth_mldsa87 = 13,
|
||||
ssl_auth_size /* number of authentication types */
|
||||
} SSLAuthType;
|
||||
|
||||
typedef enum {
|
||||
ssl_psk_none = 0,
|
||||
diff --git a/lib/ssl/tls13exthandle.c b/lib/ssl/tls13exthandle.c
|
||||
--- a/lib/ssl/tls13exthandle.c
|
||||
+++ b/lib/ssl/tls13exthandle.c
|
||||
@@ -1450,11 +1450,11 @@
|
||||
* the "advertised" list, then encode them to be sent. If we receive
|
||||
* a DC in response, validate that it matches one of the advertised
|
||||
* schemes. */
|
||||
SSLSignatureScheme filtered[MAX_SIGNATURE_SCHEMES] = { 0 };
|
||||
unsigned int filteredCount = 0;
|
||||
- SECStatus rv = ssl3_FilterSigAlgs(ss, ss->vrange.max,
|
||||
+ SECStatus rv = ssl3_FilterSigAlgs(ss, ss->vrange.max, ss->vrange.max,
|
||||
PR_TRUE /* disableRsae */,
|
||||
PR_FALSE /* forCert */,
|
||||
MAX_SIGNATURE_SCHEMES,
|
||||
filtered,
|
||||
&filteredCount);
|
||||
diff --git a/lib/ssl/tls13signature.c b/lib/ssl/tls13signature.c
|
||||
--- a/lib/ssl/tls13signature.c
|
||||
+++ b/lib/ssl/tls13signature.c
|
||||
@@ -55,10 +55,24 @@
|
||||
break;
|
||||
case ssl_sig_ecdsa_secp521r1_sha512:
|
||||
algTag = SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE;
|
||||
hashAlgTag = SEC_OID_SHA512;
|
||||
break;
|
||||
+ /* ML-DSA fully defines the hash and sign algorithm,
|
||||
+ * we set the hash alg to the same as the sign alg. */
|
||||
+ case ssl_sig_mldsa44:
|
||||
+ algTag = SEC_OID_ML_DSA_44;
|
||||
+ hashAlgTag = SEC_OID_ML_DSA_44;
|
||||
+ break;
|
||||
+ case ssl_sig_mldsa65:
|
||||
+ algTag = SEC_OID_ML_DSA_65;
|
||||
+ hashAlgTag = SEC_OID_ML_DSA_65;
|
||||
+ break;
|
||||
+ case ssl_sig_mldsa87:
|
||||
+ algTag = SEC_OID_ML_DSA_87;
|
||||
+ hashAlgTag = SEC_OID_ML_DSA_87;
|
||||
+ break;
|
||||
|
||||
/* the following is unsupported in tls 1.3 and greater, just break.
|
||||
* We include them here explicitly so we get the compiler warning about
|
||||
* missing enums in the switch statement. default would be a break anyway.
|
||||
* That way we'll know to update this table when new algorithms are
|
||||
diff --git a/lib/ssl/tls13subcerts.c b/lib/ssl/tls13subcerts.c
|
||||
--- a/lib/ssl/tls13subcerts.c
|
||||
+++ b/lib/ssl/tls13subcerts.c
|
||||
@@ -649,11 +649,17 @@
|
||||
PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
|
||||
return NULL;
|
||||
}
|
||||
return SECKEY_CreateSubjectPublicKeyInfo(dcPub);
|
||||
}
|
||||
-
|
||||
+ case mldsaKey:
|
||||
+ if (ssl_SignatureSchemeFromPublicKeyOid(dcPub->u.mldsa.paramSet)
|
||||
+ != dcCertVerifyAlg) {
|
||||
+ PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ return SECKEY_CreateSubjectPublicKeyInfo(dcPub);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
PORT_SetError(SEC_ERROR_INVALID_KEY);
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,61 +0,0 @@
|
|||
diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c
|
||||
--- a/lib/ssl/sslsock.c
|
||||
+++ b/lib/ssl/sslsock.c
|
||||
@@ -163,22 +163,22 @@ static const PRUint16 srtpCiphers[] = {
|
||||
ssl_grp_kem_##first##second, size, ssl_kea_ecdh_hybrid, \
|
||||
SEC_OID_##first_oid##second_oid, assumeSupported \
|
||||
}
|
||||
|
||||
const sslNamedGroupDef ssl_named_groups[] = {
|
||||
/* Note that 256 for 25519 and x25519mlkem786 is a lie, but we only use it
|
||||
* for checking bit security and expect 256 bits there (not 255). */
|
||||
HYGROUP(mlkem768, x25519, 256, MLKEM768, X25519, PR_TRUE),
|
||||
+ HYGROUP(secp256r1, mlkem768, 256, SECP256R1, MLKEM768, PR_TRUE),
|
||||
+ HYGROUP(secp384r1, mlkem1024, 256, SECP384R1, MLKEM1024, PR_TRUE),
|
||||
{ ssl_grp_ec_curve25519, 256, ssl_kea_ecdh, SEC_OID_CURVE25519, PR_TRUE },
|
||||
ECGROUP(secp256r1, 256, SECP256R1, PR_TRUE),
|
||||
ECGROUP(secp384r1, 384, SECP384R1, PR_TRUE),
|
||||
ECGROUP(secp521r1, 521, SECP521R1, PR_TRUE),
|
||||
- HYGROUP(secp256r1, mlkem768, 256, SECP256R1, MLKEM768, PR_TRUE),
|
||||
- HYGROUP(secp384r1, mlkem1024, 256, SECP384R1, MLKEM1024, PR_TRUE),
|
||||
{ ssl_grp_kem_xyber768d00, 256, ssl_kea_ecdh_hybrid, SEC_OID_XYBER768D00, PR_FALSE },
|
||||
FFGROUP(2048),
|
||||
FFGROUP(3072),
|
||||
FFGROUP(4096),
|
||||
FFGROUP(6144),
|
||||
FFGROUP(8192),
|
||||
ECGROUP(secp192r1, 192, SECP192R1, PR_FALSE),
|
||||
ECGROUP(secp160r2, 160, SECP160R2, PR_FALSE),
|
||||
diff --git a/lib/ssl/tls13con.c b/lib/ssl/tls13con.c
|
||||
--- a/lib/ssl/tls13con.c
|
||||
+++ b/lib/ssl/tls13con.c
|
||||
@@ -666,20 +666,29 @@ tls13_SetupClientHello(sslSocket *ss, ss
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
/* Select the first enabled group.
|
||||
* TODO(ekr@rtfm.com): be smarter about offering the group
|
||||
* that the other side negotiated if we are resuming. */
|
||||
PORT_Assert(PR_CLIST_IS_EMPTY(&ss->ephemeralKeyPairs));
|
||||
+ PRBool has_hybrid = PR_FALSE;
|
||||
for (i = 0; i < SSL_NAMED_GROUP_COUNT; ++i) {
|
||||
if (!ss->namedGroupPreferences[i]) {
|
||||
continue;
|
||||
}
|
||||
+ /* only send one hybrid key share no matter how many key
|
||||
+ * shares we send */
|
||||
+ if (ss->namedGroupPreferences[i]->keaType == ssl_kea_ecdh_hybrid) {
|
||||
+ if (has_hybrid) {
|
||||
+ continue; /* already have one skip*/
|
||||
+ }
|
||||
+ has_hybrid = PR_TRUE;
|
||||
+ }
|
||||
rv = tls13_AddKeyShare(ss, ss->namedGroupPreferences[i]);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
if (++numShares > ss->additionalShares) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- nss/lib/freebl/genload.c.const-qual-fix 2025-11-25 15:52:31.669711787 +0100
|
||||
+++ nss/lib/freebl/genload.c 2025-11-25 15:53:03.103908883 +0100
|
||||
@@ -85,7 +85,7 @@ loader_LoadLibInReferenceDir(const char*
|
||||
{
|
||||
PRLibrary* dlh = NULL;
|
||||
char* fullName = NULL;
|
||||
- char* c;
|
||||
+ const char* c;
|
||||
PRLibSpec libSpec;
|
||||
|
||||
/* Remove the trailing filename from referencePath and add the new one */
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- nss/tests/ssl/ssl.sh.test_fix 2025-11-20 09:24:38.286520477 +0100
|
||||
+++ nss/tests/ssl/ssl.sh 2025-11-20 09:24:41.829532357 +0100
|
||||
@@ -126,7 +126,7 @@ ssl_init()
|
||||
# in fips mode, turn off curve25519 until it's NIST approved
|
||||
ALL_GROUPS="P256,P384,P521,x25519,FF2048,FF3072,FF4096,FF6144,FF8192,xyber768d00,x25519mlkem768,secp256r1mlkem768,secp384r1mlkem1024"
|
||||
NON_PQ_GROUPS="P256,P384,P521,x25519,FF2048,FF3072,FF4096,FF6144,FF8192"
|
||||
- FIPS_GROUPS="P256,P384,P521,FF2048,FF3072,FF4096,FF6144,FF8192,mx25519mlkem768,secp256r1mlkem768,secp384r1mlkem1024"
|
||||
+ FIPS_GROUPS="P256,P384,P521,FF2048,FF3072,FF4096,FF6144,FF8192,x25519mlkem768,secp256r1mlkem768,secp384r1mlkem1024"
|
||||
FIPS_NON_PQ_GROUPS="P256,P384,P521,FF2048,FF3072,FF4096,FF6144,FF8192"
|
||||
|
||||
|
||||
39
nss-3.53.1-revert_rhel8_unsafe_policy_change.patch
Normal file
39
nss-3.53.1-revert_rhel8_unsafe_policy_change.patch
Normal 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
|
||||
19
nss-3.65-disable-hw-ppc.patch
Normal file
19
nss-3.65-disable-hw-ppc.patch
Normal 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;
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,78 +0,0 @@
|
|||
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
|
||||
|
||||
|
||||
62
nss-539183.patch
Normal file
62
nss-539183.patch
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
--- 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)");
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Index: nss/coreconf/Linux.mk
|
||||
===================================================================
|
||||
--- nss.orig/coreconf/Linux.mk
|
||||
+++ nss/coreconf/Linux.mk
|
||||
@@ -144,7 +144,7 @@ ifdef USE_PTHREADS
|
||||
endif
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
-DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
|
||||
+DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections $(DSO_LDFLAGS)
|
||||
# The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
|
||||
# incorrectly reports undefined references in the libraries we link with, so
|
||||
# we don't use -z defs there.
|
||||
18
nss-fedora-btrf-sql-hack.patch
Normal file
18
nss-fedora-btrf-sql-hack.patch
Normal 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) {
|
||||
42
nss-fix-PayPal-upstream.patch
Normal file
42
nss-fix-PayPal-upstream.patch
Normal 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
|
||||
|
||||
21
nss-gcm-param-default-pkcs11v2.patch
Normal file
21
nss-gcm-param-default-pkcs11v2.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
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>
|
||||
4
nss-p11-kit.config
Normal file
4
nss-p11-kit.config
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
name=p11-kit-proxy
|
||||
library=p11-kit-proxy.so
|
||||
|
||||
|
||||
|
|
@ -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) {
|
||||
- snprintf(filename, sizeof(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)) {
|
||||
+ 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) {
|
||||
snprintf(filename, sizeof(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)) {
|
||||
+ errorCount++;
|
||||
|
|
|
|||
749
nss-sql-man-page.patch
Normal file
749
nss-sql-man-page.patch
Normal 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 "
|
||||
< 0> rsa 455a6673bde9375c2887ec8bf8016b3f9f35861d Thawte Freemail Member's Thawte Consulting (Pty) Ltd. ID
|
||||
< 1> rsa 40defeeb522ade11090eacebaaf1196a172127df Example Domain Administrator Cert
|
||||
< 2> rsa 1d0b06f44f6c03842f7d4f4a1dc78b3bcd1b85a5 John Smith user cert</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>
|
||||
19
nss-turn-off-expired-ocsp-cert.patch
Normal file
19
nss-turn-off-expired-ocsp-cert.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff --git a/tests/chains/scenarios/nameconstraints.cfg b/tests/chains/scenarios/nameconstraints.cfg
|
||||
--- a/tests/chains/scenarios/nameconstraints.cfg
|
||||
+++ b/tests/chains/scenarios/nameconstraints.cfg
|
||||
@@ -159,12 +159,12 @@ verify NameConstraints.dcissblocked:x
|
||||
verify NameConstraints.dcissallowed:x
|
||||
result pass
|
||||
|
||||
# Subject: "O = IPA.LOCAL 201901211552, CN = OCSP Subsystem"
|
||||
#
|
||||
# This tests that a non server certificate (i.e. id-kp-serverAuth
|
||||
# not present in EKU) does *NOT* have CN treated as dnsName for
|
||||
# purposes of Name Constraints validation
|
||||
-verify NameConstraints.ocsp1:x
|
||||
- usage 10
|
||||
- result pass
|
||||
+#verify NameConstraints.ocsp1:x
|
||||
+# usage 10
|
||||
+# result pass
|
||||
|
||||
455
nss.spec
455
nss.spec
|
|
@ -1,16 +1,12 @@
|
|||
%global nspr_version 4.38.2
|
||||
%global nss_version 3.119.1
|
||||
%global nspr_version 4.32.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]
|
||||
%global nspr_release 5
|
||||
%global nss_version 3.77.0
|
||||
# only need to update this as we added new
|
||||
# algorithms under nss policy control
|
||||
%global crypto_policies_version 20240521
|
||||
%global crypto_policies_version 20210118
|
||||
%global unsupported_tools_directory %{_libdir}/nss/unsupported-tools
|
||||
%global saved_files_dir %{_libdir}/nss/saved
|
||||
%global dracutlibdir %{_prefix}/lib/dracut
|
||||
|
|
@ -52,25 +48,16 @@ rpm.define(string.format("nss_archive_version %s",
|
|||
string.gsub(rpm.expand("%nss_version"), "(.*)%.0$", "%1")))
|
||||
}
|
||||
|
||||
%{lua:
|
||||
if rpm.expand("%{nss_version}") == "3.119.1" then
|
||||
rpm.define(string.format("nss_archive_version %s",
|
||||
string.gsub(rpm.expand("%{nss_archive_version}"), "%.", "_")))
|
||||
end
|
||||
}
|
||||
|
||||
%{lua:
|
||||
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}%{?dist}
|
||||
License: MPL-2.0
|
||||
Release: 1%{?dist}
|
||||
License: MPLv2.0
|
||||
URL: http://www.mozilla.org/projects/security/pki/nss/
|
||||
Requires: nspr >= %{nspr_version}
|
||||
Requires: nss-util >= %{nss_version}
|
||||
|
|
@ -78,6 +65,7 @@ Requires: nss-util >= %{nss_version}
|
|||
Requires: nss-softokn%{_isa} >= %{nss_version}
|
||||
Requires: nss-system-init
|
||||
Requires: p11-kit-trust
|
||||
Requires: /usr/bin/update-crypto-policies
|
||||
Requires: crypto-policies >= %{crypto_policies_version}
|
||||
# for shlibsign
|
||||
BuildRequires: make
|
||||
|
|
@ -90,7 +78,7 @@ BuildRequires: psmisc
|
|||
BuildRequires: perl-interpreter
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
Source0: https://ftp.mozilla.org/pub/security/nss/releases/%{nss_release_tag}/src/%{nss_nspr_archive}.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
|
||||
Source2: nss-util-config.in
|
||||
Source3: nss-softokn.pc.in
|
||||
|
|
@ -99,11 +87,9 @@ Source6: nss-softokn-dracut-module-setup.sh
|
|||
Source7: nss-softokn-dracut.conf
|
||||
Source8: nss.pc.in
|
||||
Source9: nss-config.in
|
||||
%if %{with dbm}
|
||||
Source10: blank-cert8.db
|
||||
Source11: blank-key3.db
|
||||
Source12: blank-secmod.db
|
||||
%endif
|
||||
Source13: blank-cert9.db
|
||||
Source14: blank-key4.db
|
||||
Source15: system-pkcs11.txt
|
||||
|
|
@ -111,17 +97,18 @@ Source16: setup-nsssysinit.sh
|
|||
Source20: nss-config.xml
|
||||
Source21: setup-nsssysinit.xml
|
||||
Source22: pkcs11.txt.xml
|
||||
Source24: cert9.db.xml
|
||||
Source26: key4.db.xml
|
||||
%if %{with dbm}
|
||||
Source23: cert8.db.xml
|
||||
Source24: cert9.db.xml
|
||||
Source25: key3.db.xml
|
||||
Source26: key4.db.xml
|
||||
Source27: secmod.db.xml
|
||||
%endif
|
||||
Source30: nss-3.118-ml-dsa-test-for-sign-verify-pkcs12_files.tar.xz
|
||||
Source28: nss-p11-kit.config
|
||||
|
||||
Source100: nspr-%{nspr_archive_version}.tar.gz
|
||||
Source101: nspr-config.xml
|
||||
|
||||
# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=617723
|
||||
Patch2: nss-539183.patch
|
||||
# This patch uses the GCC -iquote option documented at
|
||||
# http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options
|
||||
# to give the in-tree headers a higher priority over the system headers,
|
||||
|
|
@ -131,28 +118,15 @@ Source101: nspr-config.xml
|
|||
# case when starting an update with API changes or even private export
|
||||
# changes.
|
||||
#
|
||||
# Once the buildroot has been bootstrapped the patch may be removed
|
||||
# Once the buildroot aha been bootstrapped the patch may be removed
|
||||
# but it doesn't hurt to keep it.
|
||||
Patch4: iquote.patch
|
||||
Patch12: nss-signtool-format.patch
|
||||
Patch13: nss-dso-ldflags.patch
|
||||
# fedora disabled dbm by default
|
||||
Patch40: nss-no-dbm-man-page.patch
|
||||
|
||||
# https://issues.redhat.com/browse/FC-1613
|
||||
Patch50: nss-3.110-dissable_test-ssl_policy_pkix_oscp.patch
|
||||
|
||||
# ML-DSA support patches that haven't made it to the 3.118.1 release
|
||||
Patch60: nss-3.118-ml-dsa-leancrypto.patch
|
||||
Patch61: nss-3.118-ml-dsa-tls.patch
|
||||
#Patch62: nss-3.118-prefer-all-hybrid.patch
|
||||
|
||||
Patch65: nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch
|
||||
Patch66: nss-3.118-ml-dsa-tls-test.patch
|
||||
Patch67: nss-3.118-ml-dsa-unittests.patch
|
||||
|
||||
Patch70: nss-3.118.1-fix-test-typo.patch
|
||||
Patch71: nss-3.118.1-add-const-qual-for-gcc15.patch
|
||||
%if 0%{?fedora} < 34
|
||||
%if 0%{?rhel} < 9
|
||||
Patch20: nss-gcm-param-default-pkcs11v2.patch
|
||||
%endif
|
||||
%endif
|
||||
|
||||
Patch100: nspr-config-pc.patch
|
||||
Patch101: nspr-gcc-atomics.patch
|
||||
|
|
@ -166,7 +140,7 @@ v3 certificates, and other security standards.
|
|||
|
||||
%package tools
|
||||
Summary: Tools for the Network Security Services
|
||||
Requires: %{name}%{?_isa} = %{nss_version}-%{release}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description tools
|
||||
Network Security Services (NSS) is a set of libraries designed to
|
||||
|
|
@ -183,7 +157,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} = %{nss_version}-%{release}
|
||||
Requires: nss%{?_isa} = %{version}-%{release}
|
||||
Requires(post): coreutils, sed
|
||||
|
||||
%description sysinit
|
||||
|
|
@ -194,8 +168,8 @@ any system or user configured modules.
|
|||
|
||||
%package devel
|
||||
Summary: Development libraries for Network Security Services
|
||||
Provides: nss-static = %{nss_version}-%{release}
|
||||
Requires: nss%{?_isa} = %{nss_version}-%{release}
|
||||
Provides: nss-static = %{version}-%{release}
|
||||
Requires: nss%{?_isa} = %{version}-%{release}
|
||||
Requires: nss-util-devel
|
||||
Requires: nss-softokn-devel
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
|
|
@ -208,9 +182,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 = %{nss_version}-%{release}
|
||||
Requires: nss-devel = %{nss_version}-%{release}
|
||||
Requires: nss-softokn-freebl-devel = %{nss_version}-%{release}
|
||||
Provides: nss-pkcs11-devel-static = %{version}-%{release}
|
||||
Requires: nss-devel = %{version}-%{release}
|
||||
Requires: nss-softokn-freebl-devel = %{version}-%{release}
|
||||
|
||||
%description pkcs11-devel
|
||||
Library files for developing PKCS #11 modules using basic NSS
|
||||
|
|
@ -226,7 +200,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} = %{nss_version}-%{release}
|
||||
Requires: nss-util%{?_isa} = %{version}-%{release}
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
Requires: pkgconfig
|
||||
|
||||
|
|
@ -237,8 +211,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 >= %{nss_version}-%{release}
|
||||
Requires: nss-softokn-freebl%{_isa} >= %{nss_version}-%{release}
|
||||
Requires: nss-util >= %{version}-%{release}
|
||||
Requires: nss-softokn-freebl%{_isa} >= %{version}-%{release}
|
||||
|
||||
%description softokn
|
||||
Network Security Services Softoken Cryptographic Module
|
||||
|
|
@ -259,8 +233,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 = %{nss_version}-%{release}
|
||||
Requires: nss-softokn-freebl%{?_isa} = %{nss_version}-%{release}
|
||||
Provides: nss-softokn-freebl-static = %{version}-%{release}
|
||||
Requires: nss-softokn-freebl%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description softokn-freebl-devel
|
||||
NSS Softoken Cryptographic Module Freebl Library Development Tools
|
||||
|
|
@ -271,10 +245,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} = %{nss_version}-%{release}
|
||||
Requires: nss-softokn-freebl-devel%{?_isa} = %{nss_version}-%{release}
|
||||
Requires: nss-softokn%{?_isa} = %{version}-%{release}
|
||||
Requires: nss-softokn-freebl-devel%{?_isa} = %{version}-%{release}
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
Requires: nss-util-devel >= %{nss_version}-%{release}
|
||||
Requires: nss-util-devel >= %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description softokn-devel
|
||||
|
|
@ -284,11 +258,10 @@ Header and library files for doing development with Network Security Services.
|
|||
Summary: Netscape Portable Runtime
|
||||
Version: %{nspr_version}
|
||||
Release: %{nspr_release}%{?dist}
|
||||
License: MPL-2.0
|
||||
License: MPLv2.0
|
||||
URL: http://www.mozilla.org/projects/nspr/
|
||||
Conflicts: filesystem < 3
|
||||
BuildRequires: gcc
|
||||
BuildRequires: binutils >= 2.45.50-9
|
||||
|
||||
%description -n nspr
|
||||
NSPR provides platform independence for non-GUI operating system
|
||||
|
|
@ -308,22 +281,23 @@ 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
|
||||
|
||||
%patch -P 100 -p0 -b .flags
|
||||
%patch100 -p0 -b .flags
|
||||
pushd nspr
|
||||
%patch -P 101 -p1 -b .gcc-atomics
|
||||
%patch101 -p1 -b .gcc-atomics
|
||||
popd
|
||||
|
||||
pushd nss
|
||||
%autopatch -p1 -M 99
|
||||
popd
|
||||
|
||||
tar -xf %{SOURCE30}
|
||||
cp -r nss-3.118-ml-dsa-test-for-sign-verify-pkcs12_files/* nss/tests/tools/
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1247353
|
||||
find nss/lib/libpkix -perm /u+x -type f -exec chmod -x {} \;
|
||||
|
||||
|
|
@ -356,7 +330,7 @@ pushd nspr_build
|
|||
%ifarch i686 x86_64
|
||||
sed -i '/^PR_MD_ASFILES/d' config/autoconf.mk
|
||||
%endif
|
||||
%{make_build}
|
||||
make
|
||||
|
||||
date +"%e %B %Y" | tr -d '\n' > date.xml
|
||||
echo -n %{nspr_version} > version.xml
|
||||
|
|
@ -372,7 +346,7 @@ popd
|
|||
# Build NSS
|
||||
#
|
||||
# This package fails its testsuite with LTO. Disable LTO for now
|
||||
#%global _lto_cflags %{nil}
|
||||
%global _lto_cflags %{nil}
|
||||
|
||||
#export FREEBL_NO_DEPEND=1
|
||||
|
||||
|
|
@ -386,7 +360,6 @@ popd
|
|||
export IN_TREE_FREEBL_HEADERS_FIRST=1
|
||||
|
||||
export NSS_FORCE_FIPS=1
|
||||
export NSS_DISABLE_DEPRECATED_SEED=1
|
||||
|
||||
# Enable compiler optimizations and disable debugging code
|
||||
export BUILD_OPT=1
|
||||
|
|
@ -409,13 +382,12 @@ export XCFLAGS="$XCFLAGS -Wno-array-parameter"
|
|||
|
||||
export LDFLAGS=$RPM_LD_FLAGS
|
||||
|
||||
export DSO_LDFLAGS=$RPM_LD_FLAGS
|
||||
export DSO_LDOPTS=$RPM_LD_FLAGS
|
||||
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
||||
|
||||
export NSPR_INCLUDE_DIR=$PWD/dist/include/nspr
|
||||
export NSPR_LIB_DIR=$PWD/dist/lib
|
||||
|
||||
export NSS_USE_SYSTEM_SQLITE=1
|
||||
|
||||
|
|
@ -440,9 +412,8 @@ export POLICY_FILE="nss.config"
|
|||
# location of the policy file
|
||||
export POLICY_PATH="/etc/crypto-policies/back-ends"
|
||||
|
||||
|
||||
%{make_build} -C ./nss all
|
||||
%{make_build} -C ./nss latest
|
||||
%{__make} -C ./nss all
|
||||
%{__make} -C ./nss latest
|
||||
|
||||
# build the man pages clean
|
||||
pushd ./nss
|
||||
|
|
@ -537,19 +508,19 @@ date +"%e %B %Y" | tr -d '\n' > date.xml
|
|||
echo -n %{nss_version} > version.xml
|
||||
|
||||
# configuration files and setup script
|
||||
%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
|
||||
for m in %{SOURCE20} %{SOURCE21} %{SOURCE22}; do
|
||||
cp ${m} .
|
||||
done
|
||||
%global configFiles nss-config setup-nsssysinit
|
||||
for m in %{configFiles} %{dbfiles}; do
|
||||
xmlto man ${m}.xml
|
||||
for m in nss-config.xml setup-nsssysinit.xml pkcs11.txt.xml; do
|
||||
xmlto man ${m}
|
||||
done
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
|
|
@ -574,8 +545,6 @@ popd
|
|||
export FREEBL_NO_DEPEND=1
|
||||
|
||||
export BUILD_OPT=1
|
||||
export NSS_DISABLE_PPC_GHASH=1
|
||||
export NSS_DISABLE_DEPRECATED_SEED=1
|
||||
|
||||
%ifnarch noarch
|
||||
%if 0%{__isa_bits} == 64
|
||||
|
|
@ -585,15 +554,6 @@ export USE_64=1
|
|||
|
||||
# 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
|
||||
# disabled by the system policy.
|
||||
export NSS_IGNORE_SYSTEM_POLICY=1
|
||||
|
|
@ -617,9 +577,9 @@ if [ $SPACEISBAD -ne 0 ]; then
|
|||
echo "error: filenames containing space are not supported (xargs)"
|
||||
exit 1
|
||||
fi
|
||||
export MYRAND=`perl -e 'print 9000 + int rand 1000'`; echo $MYRAND
|
||||
export RANDSERV=selfserv_${MYRAND}; echo $RANDSERV
|
||||
export DISTBINDIR=./dist/${LOBJDIR}/bin
|
||||
MYRAND=`perl -e 'print 9000 + int rand 1000'`; echo $MYRAND ||:
|
||||
RANDSERV=selfserv_${MYRAND}; echo $RANDSERV ||:
|
||||
DISTBINDIR=`ls -d ./dist/*.OBJ/bin`; echo $DISTBINDIR ||:
|
||||
pushd "$DISTBINDIR"
|
||||
ln -s selfserv $RANDSERV
|
||||
popd
|
||||
|
|
@ -678,25 +638,6 @@ for f in nspr-config; do
|
|||
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.
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/nss3
|
||||
|
|
@ -708,6 +649,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
|
|||
mkdir -p $RPM_BUILD_ROOT/%{saved_files_dir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{dracut_modules_dir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{dracut_conf_dir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/crypto-policies/local.d
|
||||
%if %{defined rhel}
|
||||
# not needed for rhel and its derivatives only fedora
|
||||
%else
|
||||
|
|
@ -724,17 +666,15 @@ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
|
|||
# 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
|
||||
do
|
||||
install -p -m 755 dist/${LOBJDIR}/lib/$file $RPM_BUILD_ROOT/%{_libdir}
|
||||
install -p -m 755 dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir}
|
||||
done
|
||||
|
||||
# Install the empty NSS db files
|
||||
# Legacy db
|
||||
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 %{SOURCE11} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/key3.db
|
||||
install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/secmod.db
|
||||
%endif
|
||||
# Shared 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
|
||||
|
|
@ -743,19 +683,19 @@ install -p -m 644 %{SOURCE15} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/pkcs11.tx
|
|||
# Copy the development libraries we want
|
||||
for file in libcrmf.a libnssb.a libnssckfw.a
|
||||
do
|
||||
install -p -m 644 dist/${LOBJDIR}/lib/$file $RPM_BUILD_ROOT/%{_libdir}
|
||||
install -p -m 644 dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir}
|
||||
done
|
||||
|
||||
# Copy the binaries we want
|
||||
for file in certutil cmsutil crlutil modutil nss-policy-check pk12util signver ssltap
|
||||
do
|
||||
install -p -m 755 dist/${LOBJDIR}/bin/$file $RPM_BUILD_ROOT/%{_bindir}
|
||||
install -p -m 755 dist/*.OBJ/bin/$file $RPM_BUILD_ROOT/%{_bindir}
|
||||
done
|
||||
|
||||
# Copy the binaries we ship as unsupported
|
||||
for file in bltest dbtool 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
|
||||
install -p -m 755 dist/${LOBJDIR}/bin/$file $RPM_BUILD_ROOT/%{unsupported_tools_directory}
|
||||
install -p -m 755 dist/*.OBJ/bin/$file $RPM_BUILD_ROOT/%{unsupported_tools_directory}
|
||||
done
|
||||
|
||||
# Copy the include files we want
|
||||
|
|
@ -773,7 +713,7 @@ done
|
|||
# Copy the static freebl library
|
||||
for file in libfreebl.a
|
||||
do
|
||||
install -p -m 644 dist/${LOBJDIR}/lib/$file $RPM_BUILD_ROOT/%{_libdir}
|
||||
install -p -m 644 dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir}
|
||||
done
|
||||
|
||||
# Copy the template files we want
|
||||
|
|
@ -796,7 +736,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
|
||||
|
||||
# Copy the man pages for scripts
|
||||
for f in %{configFiles}; do
|
||||
for f in nss-config setup-nsssysinit; do
|
||||
install -c -m 644 ${f}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${f}.1
|
||||
done
|
||||
# Copy the man pages for the nss tools
|
||||
|
|
@ -809,10 +749,17 @@ 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
|
||||
%endif
|
||||
|
||||
# Copy the man pages for the nss databases
|
||||
for f in %{dbfiles}; do
|
||||
# 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
|
||||
for f in cert8.db cert9.db key3.db key4.db secmod.db; do
|
||||
install -c -m 644 ${f}.5 $RPM_BUILD_ROOT%{_mandir}/man5/${f}.5
|
||||
done
|
||||
|
||||
# Copy the crypto-policies configuration file
|
||||
install -p -m 644 %{SOURCE28} $RPM_BUILD_ROOT/%{_sysconfdir}/crypto-policies/local.d
|
||||
|
||||
%triggerpostun -n nss-sysinit -- nss-sysinit < 3.12.8-3
|
||||
# Reverse unwanted disabling of sysinit by faulty preun sysinit scriplet
|
||||
|
|
@ -833,6 +780,9 @@ if test $1 -eq 2; then
|
|||
fi
|
||||
%endif
|
||||
|
||||
%posttrans
|
||||
update-crypto-policies &> /dev/null || :
|
||||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
|
|
@ -841,19 +791,16 @@ fi
|
|||
%{_libdir}/libssl3.so
|
||||
%{_libdir}/libsmime3.so
|
||||
%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/key3.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/key4.db
|
||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/pkcs11.txt
|
||||
%if %{with dbm}
|
||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/crypto-policies/local.d/nss-p11-kit.config
|
||||
%doc %{_mandir}/man5/cert8.db.5*
|
||||
%doc %{_mandir}/man5/key3.db.5*
|
||||
%doc %{_mandir}/man5/secmod.db.5*
|
||||
%endif
|
||||
%doc %{_mandir}/man5/cert9.db.5*
|
||||
%doc %{_mandir}/man5/key4.db.5*
|
||||
%doc %{_mandir}/man5/pkcs11.txt.5*
|
||||
|
|
@ -996,11 +943,9 @@ fi
|
|||
%{_includedir}/nss3/ciferfam.h
|
||||
%{_includedir}/nss3/eccutil.h
|
||||
%{_includedir}/nss3/hasht.h
|
||||
%{_includedir}/nss3/kyber.h
|
||||
%{_includedir}/nss3/nssb64.h
|
||||
%{_includedir}/nss3/nssb64t.h
|
||||
%{_includedir}/nss3/nsslocks.h
|
||||
%{_includedir}/nss3/nsshash.h
|
||||
%{_includedir}/nss3/nssilock.h
|
||||
%{_includedir}/nss3/nssilckt.h
|
||||
%{_includedir}/nss3/nssrwlk.h
|
||||
|
|
@ -1045,7 +990,6 @@ fi
|
|||
%dir %{saved_files_dir}
|
||||
%dir %{unsupported_tools_directory}
|
||||
%{unsupported_tools_directory}/bltest
|
||||
%{unsupported_tools_directory}/dbtool
|
||||
%{unsupported_tools_directory}/ecperf
|
||||
%{unsupported_tools_directory}/fbectest
|
||||
%{unsupported_tools_directory}/fipstest
|
||||
|
|
@ -1090,7 +1034,6 @@ fi
|
|||
%{_includedir}/nss3/ecl-exp.h
|
||||
%{_includedir}/nss3/nsslowhash.h
|
||||
%{_includedir}/nss3/shsign.h
|
||||
%{_includedir}/nss3/ml_dsat.h
|
||||
|
||||
%files -n nspr
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
|
|
@ -1103,242 +1046,38 @@ fi
|
|||
%{_includedir}/nspr4
|
||||
%{_libdir}/pkgconfig/nspr.pc
|
||||
%{_bindir}/nspr-config
|
||||
%doc %{_mandir}/man1/nspr-config.*
|
||||
%{_mandir}/man*/*
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jan 5 2026 Frantisek Krenzelok <fkrenzel@redhat.com> - 3.119.1-1
|
||||
- Update NSS to 3.119.1 with NSPR 4.38.2
|
||||
- Fix previous changelog
|
||||
|
||||
* Fri Dec 5 2025 Frantisek Krenzelok <fkrenzel@redhat.com> - 3.119.0-1
|
||||
- Update NSS to 3.119.0 with NSPR 4.38.2
|
||||
|
||||
* Tue Nov 25 2025 Frantisek Krenzelok <fkrenzel@redhat.com> - 3.118.1-3
|
||||
- Rebuild for binutils-2.45.50-9.fc44
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2415065
|
||||
|
||||
* Wed Nov 19 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.118.1-2
|
||||
- Add the rest of the patches for ML-DSA support (not yet in 3.118.1 upstream).
|
||||
|
||||
* Wed Nov 19 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.118.1-1
|
||||
- Update NSS to 3.118.1
|
||||
|
||||
* Wed Oct 15 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.117.0-1
|
||||
- Update NSS to 3.117.0
|
||||
|
||||
* Fri Sep 12 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.116.0-1
|
||||
- Update NSS to 3.116.0
|
||||
|
||||
* Mon Aug 25 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.115.1-1
|
||||
- Update NSS to 3.115.1
|
||||
|
||||
* Fri Aug 15 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.115.0-1
|
||||
- Update NSS to 3.115.0
|
||||
|
||||
* Thu Aug 14 2025 Bojan Smojver <bojan@rexursive.com> - 3.114.0-2
|
||||
- Patch for merge test failure (Bob Relyea <rrelyea@redhat.com>)
|
||||
|
||||
* Wed Jul 30 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.114.0-1
|
||||
- Update NSS to 3.114.0
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.113.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Mon Jun 30 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.113.0-1
|
||||
- Update NSS to 3.113.0
|
||||
|
||||
* Tue May 27 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.112.0-1
|
||||
- Update NSS to 3.112.0
|
||||
|
||||
* Mon May 05 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.111.0-1
|
||||
- Update NSS to 3.111.0
|
||||
|
||||
* Tue Apr 22 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.110.0-2
|
||||
- Dissable test ssl_policy_pkix_oscp due to dns resolution issues on the host
|
||||
- Related: FC-1613
|
||||
|
||||
* Mon Mar 31 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.110.0-1
|
||||
- Update NSS to 3.110.0
|
||||
|
||||
* Mon Mar 3 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.109.0-1
|
||||
- Update NSS to 3.109.0
|
||||
|
||||
* Thu Feb 6 2025 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.108.0-1
|
||||
- Update NSS to 3.108.0
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.107.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Mon Dec 9 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.107.0-1
|
||||
- Update NSS to 3.107.0
|
||||
|
||||
* Tue Nov 19 2024 Bojan Smojver <bojan@rexursive.com> - 3.106.0-1
|
||||
- Update NSS to 3.106.0
|
||||
|
||||
* Thu Oct 3 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.105.0-1
|
||||
- Update NSS to 3.105.0
|
||||
|
||||
* Wed Sep 4 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.104.0-1
|
||||
- Update NSS to 3.104.0
|
||||
|
||||
* Mon Aug 5 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.103.0-1
|
||||
- Update NSS to 3.103.0
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.101.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Jun 20 2024 Bob Relyea <rrelyea@redhat.com> - 3.101.0-3
|
||||
- Make sure the rpm LD flags are passed to the NSS build system.
|
||||
|
||||
* Wed Jun 12 2024 Bob Relyea <rrelyea@redhat.com> - 3.101.0-2
|
||||
- Enable the Kyber record so we can control it with policies.
|
||||
|
||||
* Mon Jun 10 2024 Bob Relyea <rrelyea@redhat.com> - 3.101.0-1
|
||||
- Update NSS to 3.101.0
|
||||
- Turn off deprecated SEED algorithm
|
||||
|
||||
* Tue May 28 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.100.0-1
|
||||
- Update NSS to 3.100.0
|
||||
|
||||
* Mon Mar 18 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.99.0-1
|
||||
- Update NSS to 3.99.0
|
||||
|
||||
* Sat Feb 17 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.98.0-1
|
||||
- Update NSS to 3.98.0
|
||||
|
||||
* Sat Jan 27 2024 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.97.0-1
|
||||
- Update NSS to 3.97.0
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.96.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.96.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Dec 21 2023 Frantisek Krenzelok <krenzelok.frantisek@gmail.com> - 3.96.1-1
|
||||
- Update NSS to 3.96.1
|
||||
|
||||
* 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
|
||||
- update to NSPR 4.35
|
||||
|
||||
* Fri Sep 9 2022 Bob Relyea <rrelyea@redhat.com> - 3.81.0-2
|
||||
- add dbtool
|
||||
|
||||
* Thu Jul 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
|
||||
* Tue Apr 5 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
|
||||
* Mon Feb 7 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
|
||||
- fixes 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
|
||||
* Mon Oct 4 2021 Bob Relyea <rrelyea@redhat.com> - 3.72.0-1
|
||||
- Update to 3.72
|
||||
|
||||
* 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
|
||||
* Fri May 21 2021 Bob Relyea <rrelyea@redhat.com> - 3.67.0-1
|
||||
- Update NSS to 3.67
|
||||
- Update NSPR to 2.31
|
||||
|
||||
* 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
|
||||
* Fri May 21 2021 Bob Relyea <rrelyea@redhat.com> - 3.65.0-1
|
||||
- Update NSS to 3.65
|
||||
|
||||
* 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
|
||||
* Wed Mar 24 2021 Bob Relyea <rrelyea@redhat.com> - 3.63.0-1
|
||||
- Update NSS to 3.63
|
||||
- Update NSPR to 2.30
|
||||
|
||||
* Tue Feb 23 2021 Bob Relyea <rrelyea@redhat.com> - 3.62.0-1
|
||||
- Update to 3.62
|
||||
|
|
@ -1381,7 +1120,7 @@ fi
|
|||
- 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
|
||||
- fix pkix ocsp to tolerate OCSP checking on intermediates
|
||||
when the root is signed by sha1 and sha1 is disabled by
|
||||
policy
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
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
|
||||
7
sources
7
sources
|
|
@ -1,4 +1,7 @@
|
|||
SHA512 (blank-cert8.db) = ac131d15708c5f1b5e467831f919f4fc4ba13b60a4bb5fe260c845fa9afcd899a588d21ed52060abaa1bbb29f2b53af8b495d28407183cb03aff1974f95f1d3d
|
||||
SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403fda3e3d4e7757838061ae56ccf5aac335cb54f254f0a9e6e9c0dd5920b4155a39264525b06
|
||||
SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c
|
||||
SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7
|
||||
SHA512 (nss-3.118-ml-dsa-test-for-sign-verify-pkcs12_files.tar.xz) = c6440f332703ca9a3351be5a35eac42f24b9c114f54137b95691aa353cc329f0fb7016b689b2f976bc6cff66aa62760067f3226efad665a5252f37294a3d12a6
|
||||
SHA512 (nss-3_119_1-with-nspr-4.38.2.tar.gz) = 926b68d5a94c28c651d4282f3bba34a4347ae39e31b1fb7a449da11123bed08caeba7cb300e242a8c4fab1f683765b50888b63b62ba9e4dc092fd86588cc5443
|
||||
SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310
|
||||
SHA512 (nspr-4.32.tar.gz) = da9b65b374783d20a2e589211b411816d899e296e91175d376e59df1919144c1808c155a234d6ceefdf7b8ae8f47cec98d92a5aa3150a579513251860e50dcb7
|
||||
SHA512 (nss-3.77.tar.gz) = bd62eeb8f90ecd2d3999fd78fea6652736c02a6530f29e98d0cad0707f3b901b30409132eb6a6d53b9f5c05c6b464615a946a2a3e255553c793e44d0ed93179e
|
||||
|
|
|
|||
64
tests/NSS-tools-should-not-use-SHA1-by-default-when/Makefile
Normal file
64
tests/NSS-tools-should-not-use-SHA1-by-default-when/Makefile
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
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
|
||||
125
tests/NSS-tools-should-not-use-SHA1-by-default-when/runtest.sh
Executable file
125
tests/NSS-tools-should-not-use-SHA1-by-default-when/runtest.sh
Executable file
|
|
@ -0,0 +1,125 @@
|
|||
#!/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
|
||||
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue