import nss-3.79.0-4.el8_6
This commit is contained in:
parent
5d9f36ddff
commit
13c552c132
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,7 +1,6 @@
|
||||
SOURCES/PayPalEE.cert
|
||||
SOURCES/blank-cert8.db
|
||||
SOURCES/blank-cert9.db
|
||||
SOURCES/blank-key3.db
|
||||
SOURCES/blank-key4.db
|
||||
SOURCES/blank-secmod.db
|
||||
SOURCES/nss-3.67.tar.gz
|
||||
SOURCES/nss-3.79.tar.gz
|
||||
|
@ -1,7 +1,6 @@
|
||||
bc5c03643bfa1a5ea8519b8e7e2d7d5e30abea30 SOURCES/PayPalEE.cert
|
||||
d272a7b58364862613d44261c5744f7a336bf177 SOURCES/blank-cert8.db
|
||||
b5570125fbf6bfb410705706af48217a0817c03a SOURCES/blank-cert9.db
|
||||
7f78b5bcecdb5005e7b803604b2ec9d1a9df2fb5 SOURCES/blank-key3.db
|
||||
f9c9568442386da370193474de1b25c3f68cdaf6 SOURCES/blank-key4.db
|
||||
bd748cf6e1465a1bbe6e751b72ffc0076aff0b50 SOURCES/blank-secmod.db
|
||||
9cccf98f0476905c0d863a6b2cb08a1955482241 SOURCES/nss-3.67.tar.gz
|
||||
3719dd97c8ec9cb04aa61e6aca41b129b4adc004 SOURCES/nss-3.79.tar.gz
|
||||
|
@ -1,39 +0,0 @@
|
||||
diff -up ./lib/softoken/kbkdf.c.coverity ./lib/softoken/kbkdf.c
|
||||
--- ./lib/softoken/kbkdf.c.coverity 2019-12-03 15:33:43.047732312 -0800
|
||||
+++ ./lib/softoken/kbkdf.c 2019-12-03 15:39:40.982578357 -0800
|
||||
@@ -534,6 +534,10 @@ CK_RV kbkdf_CreateKey(CK_SESSION_HANDLE
|
||||
PR_ASSERT(derived_key != NULL);
|
||||
PR_ASSERT(derived_key->phKey != NULL);
|
||||
|
||||
+ if (slot == NULL) {
|
||||
+ return CKR_SESSION_HANDLE_INVALID;
|
||||
+ }
|
||||
+
|
||||
/* Create the new key object for this additional derived key. */
|
||||
key = sftk_NewObject(slot);
|
||||
if (key == NULL) {
|
||||
@@ -589,7 +593,9 @@ done:
|
||||
sftk_FreeObject(key);
|
||||
|
||||
/* Doesn't do anything. */
|
||||
- sftk_FreeSession(session);
|
||||
+ if (session) {
|
||||
+ sftk_FreeSession(session);
|
||||
+ }
|
||||
|
||||
return ret;
|
||||
}
|
||||
diff -up ./lib/softoken/sftkhmac.c.coverity ./lib/softoken/sftkhmac.c
|
||||
--- ./lib/softoken/sftkhmac.c.coverity 2019-12-03 15:40:06.108848341 -0800
|
||||
+++ ./lib/softoken/sftkhmac.c 2019-12-03 15:41:04.919480267 -0800
|
||||
@@ -232,7 +232,9 @@ sftk_MAC_Init(sftk_MACCtx *ctx, CK_MECHA
|
||||
keyval->attrib.ulValueLen, isFIPS);
|
||||
|
||||
done:
|
||||
- sftk_FreeAttribute(keyval);
|
||||
+ if (keyval) {
|
||||
+ sftk_FreeAttribute(keyval);
|
||||
+ }
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff -up ./coreconf/config.gypi.orig ./coreconf/config.gypi
|
||||
--- ./coreconf/config.gypi.orig 2020-06-16 15:50:59.000000000 -0700
|
||||
+++ ./coreconf/config.gypi 2020-10-15 16:05:37.542761192 -0700
|
||||
@@ -363,7 +363,7 @@
|
||||
'_DEFAULT_SOURCE', # for <endian.h> functions, strdup, realpath, and getentropy
|
||||
'_BSD_SOURCE', # for the above in glibc <= 2.19
|
||||
'_POSIX_SOURCE', # for <signal.h>
|
||||
- 'SQL_MEASURE_USE_TEMP_DIR', # use tmpdir for the access calls
|
||||
+ 'SDB_MEASURE_USE_TEMP_DIR', # use tmpdir for the access calls
|
||||
],
|
||||
}],
|
||||
[ 'OS=="dragonfly" or OS=="freebsd"', {
|
||||
diff -up ./coreconf/Linux.mk.orig ./coreconf/Linux.mk
|
||||
--- ./coreconf/Linux.mk.orig 2020-10-15 16:05:04.794591674 -0700
|
||||
+++ ./coreconf/Linux.mk 2020-10-15 16:05:37.543761197 -0700
|
||||
@@ -21,7 +21,7 @@ ifeq ($(USE_PTHREADS),1)
|
||||
endif
|
||||
|
||||
DEFAULT_COMPILER = gcc
|
||||
-DEFINES += -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR
|
||||
+DEFINES += -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSDB_MEASURE_USE_TEMP_DIR
|
||||
|
||||
ifeq ($(OS_TARGET),Android)
|
||||
ifndef ANDROID_NDK
|
@ -1,16 +0,0 @@
|
||||
diff -up ./tests/common/parsegtestreport.sed.new_gtest ./tests/common/parsegtestreport.sed
|
||||
--- ./tests/common/parsegtestreport.sed.new_gtest 2021-06-17 16:26:49.361035662 -0700
|
||||
+++ ./tests/common/parsegtestreport.sed 2021-06-17 16:49:08.512261136 -0700
|
||||
@@ -1,8 +1,11 @@
|
||||
/\<testcase/{
|
||||
- s/^.* name="\([^"]*\)" value_param="\([^"]*\)" status="\([^"]*\)" time="[^"]*" classname="\([^"]*\)".*$/\3 '\4: \1 \2'/
|
||||
+ s/^.* name="\([^"]*\)" value_param="\([^"]*\)" status="\([^"]*\)" time="[^"]*" classname="\([^"]*\).*$/\3 '\4: \1 \2'/
|
||||
t end
|
||||
s/^.* name="\([^"]*\)" status="\([^"]*\)" time="[^"]*" classname="\([^"]*\)".*$/\2 '\3: \1'/
|
||||
t end
|
||||
+ s/^.* name="\([^"]*\)" value_param="\([^"]*\)" status="\([^"]*\)" result="[^"]*" time="[^"]*" timestamp="[^"]*" classname="\([^"]*\)".*$/\3 '\4: \1 \2'/
|
||||
+ t end
|
||||
+ s/^.* name="\([^"]*\)" status="\([^"]*\)" result="[^"]*" time="[^"]*" timestamp="[^"]*" classname="\([^"]*\)".*$/\2 '\3: \1'/
|
||||
}
|
||||
d
|
||||
: end
|
@ -1,86 +0,0 @@
|
||||
diff -up ./gtests/softoken_gtest/softoken_dh_vectors.h.orig ./gtests/softoken_gtest/softoken_dh_vectors.h
|
||||
--- ./gtests/softoken_gtest/softoken_dh_vectors.h.orig 2021-06-02 16:57:50.557008790 -0700
|
||||
+++ ./gtests/softoken_gtest/softoken_dh_vectors.h 2021-06-02 16:59:52.781735096 -0700
|
||||
@@ -2872,7 +2872,7 @@ static const DhTestVector DH_TEST_VECTOR
|
||||
{siBuffer, (unsigned char *)g2, sizeof(g2)},
|
||||
{siBuffer, NULL, 0},
|
||||
{siBuffer, NULL, 0},
|
||||
- IKE_APPROVED,
|
||||
+ SAFE_PRIME,
|
||||
CLASS_1536},
|
||||
{"IKE 2048",
|
||||
{siBuffer, (unsigned char *)prime_ike_2048, sizeof(prime_ike_2048)},
|
||||
@@ -2952,7 +2952,7 @@ static const DhTestVector DH_TEST_VECTOR
|
||||
{siBuffer, (unsigned char *)sub2_prime_ike_1536,
|
||||
sizeof(sub2_prime_ike_1536)},
|
||||
{siBuffer, NULL, 0},
|
||||
- IKE_APPROVED,
|
||||
+ SAFE_PRIME,
|
||||
CLASS_1536},
|
||||
{"IKE 2048 with subprime",
|
||||
{siBuffer, (unsigned char *)prime_ike_2048, sizeof(prime_ike_2048)},
|
||||
diff -up ./lib/softoken/pkcs11c.c.orig ./lib/softoken/pkcs11c.c
|
||||
--- ./lib/softoken/pkcs11c.c.orig 2021-05-28 02:50:43.000000000 -0700
|
||||
+++ ./lib/softoken/pkcs11c.c 2021-06-02 16:52:01.196932757 -0700
|
||||
@@ -5193,7 +5193,7 @@ sftk_PairwiseConsistencyCheck(CK_SESSION
|
||||
/* subprime not supplied, In this case look it up.
|
||||
* This only works with approved primes, but in FIPS mode
|
||||
* that's the only kine of prime that will get here */
|
||||
- subPrimePtr = sftk_VerifyDH_Prime(&prime);
|
||||
+ subPrimePtr = sftk_VerifyDH_Prime(&prime,isFIPS);
|
||||
if (subPrimePtr == NULL) {
|
||||
crv = CKR_GENERAL_ERROR;
|
||||
goto done;
|
||||
@@ -8351,7 +8351,7 @@ NSC_DeriveKey(CK_SESSION_HANDLE hSession
|
||||
|
||||
/* if the prime is an approved prime, we can skip all the other
|
||||
* checks. */
|
||||
- subPrime = sftk_VerifyDH_Prime(&dhPrime);
|
||||
+ subPrime = sftk_VerifyDH_Prime(&dhPrime,isFIPS);
|
||||
if (subPrime == NULL) {
|
||||
SECItem dhSubPrime;
|
||||
/* If the caller set the subprime value, it means that
|
||||
diff -up ./lib/softoken/pkcs11i.h.orig ./lib/softoken/pkcs11i.h
|
||||
--- ./lib/softoken/pkcs11i.h.orig 2021-06-02 16:52:01.196932757 -0700
|
||||
+++ ./lib/softoken/pkcs11i.h 2021-06-02 16:52:54.281248207 -0700
|
||||
@@ -946,7 +946,7 @@ char **NSC_ModuleDBFunc(unsigned long fu
|
||||
/* dh verify functions */
|
||||
/* verify that dhPrime matches one of our known primes, and if so return
|
||||
* it's subprime value */
|
||||
-const SECItem *sftk_VerifyDH_Prime(SECItem *dhPrime);
|
||||
+const SECItem *sftk_VerifyDH_Prime(SECItem *dhPrime, PRBool isFIPS);
|
||||
/* check if dhSubPrime claims dhPrime is a safe prime. */
|
||||
SECStatus sftk_IsSafePrime(SECItem *dhPrime, SECItem *dhSubPrime, PRBool *isSafe);
|
||||
/* map an operation Attribute to a Mechanism flag */
|
||||
diff -up ./lib/softoken/pkcs11u.c.orig ./lib/softoken/pkcs11u.c
|
||||
--- ./lib/softoken/pkcs11u.c.orig 2021-06-02 16:54:23.387777705 -0700
|
||||
+++ ./lib/softoken/pkcs11u.c 2021-06-02 16:54:51.012941866 -0700
|
||||
@@ -2312,7 +2312,7 @@ sftk_handleSpecial(SFTKSlot *slot, CK_ME
|
||||
if (crv != CKR_OK) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
- dhSubPrime = sftk_VerifyDH_Prime(&dhPrime);
|
||||
+ dhSubPrime = sftk_VerifyDH_Prime(&dhPrime, PR_TRUE);
|
||||
SECITEM_ZfreeItem(&dhPrime, PR_FALSE);
|
||||
return (dhSubPrime) ? PR_TRUE : PR_FALSE;
|
||||
}
|
||||
diff -up ./lib/softoken/sftkdhverify.c.orig ./lib/softoken/sftkdhverify.c
|
||||
--- ./lib/softoken/sftkdhverify.c.orig 2021-05-28 02:50:43.000000000 -0700
|
||||
+++ ./lib/softoken/sftkdhverify.c 2021-06-02 16:52:01.196932757 -0700
|
||||
@@ -1171,11 +1171,15 @@ static const SECItem subprime_tls_8192 =
|
||||
* verify that dhPrime matches one of our known primes
|
||||
*/
|
||||
const SECItem *
|
||||
-sftk_VerifyDH_Prime(SECItem *dhPrime)
|
||||
+sftk_VerifyDH_Prime(SECItem *dhPrime, PRBool isFIPS)
|
||||
{
|
||||
/* use the length to decide which primes to check */
|
||||
switch (dhPrime->len) {
|
||||
case 1536 / PR_BITS_PER_BYTE:
|
||||
+ /* don't accept 1536 bit primes in FIPS mode */
|
||||
+ if (isFIPS) {
|
||||
+ break;
|
||||
+ }
|
||||
if (PORT_Memcmp(dhPrime->data, prime_ike_1536,
|
||||
sizeof(prime_ike_1536)) == 0) {
|
||||
return &subprime_ike_1536;
|
@ -1,325 +0,0 @@
|
||||
diff --git a/tests/cert/Leaf-bogus-dsa.crt b/tests/cert/Leaf-bogus-dsa.crt
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/tests/cert/Leaf-bogus-dsa.crt
|
||||
@@ -0,0 +1,143 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIaZzCCCkWgAwIBAgIBATALBgcqhkjOOAQDBQAwMTEvMC0GA1UEAxMmZGVjb2Rl
|
||||
+RUNvckRTQVNpZ25hdHVyZS10ZXN0Q2FzZS90YXZpc28wHhcNMjEwMTAxMDAwMDAw
|
||||
+WhcNNDEwMTAxMDAwMDAwWjAxMS8wLQYDVQQDEyZkZWNvZGVFQ29yRFNBU2lnbmF0
|
||||
+dXJlLXRlc3RDYXNlL3RhdmlzbzCCCaYwggkaBgcqhkjOOAQBMIIJDQKBgQCqqqqq
|
||||
+qqqqqqqqqqqqqqqqqqqqqqqqqqq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
+7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u
|
||||
+7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u
|
||||
+7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u
|
||||
+7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u
|
||||
+7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u
|
||||
+7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u
|
||||
+7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u
|
||||
+7u7u7u7uAoIIAQD/////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+////////////////////////////////////////////////////////////////
|
||||
+/////////////////////////////////////////////////////////w==
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/tests/cert/Leaf-bogus-rsa-pss.crt b/tests/cert/Leaf-bogus-rsa-pss.crt
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/tests/cert/Leaf-bogus-rsa-pss.crt
|
||||
@@ -0,0 +1,126 @@
|
||||
+-----BEGIN CERTIFICATE-----
|
||||
+MIIXODCCC/WgAwIBAgIBAjApBgkqhkiG9w0BAQowHKACMAChETAPBQAwCwYJYIZI
|
||||
+AWUDBAIBogMCASAwNzEgMB4GCSqGSIb3DQEJARYRdGF2aXNvQGdvb2dsZS5jb20x
|
||||
+EzARBgNVBAMTCmJ1ZzE3Mzc0NzAwHhcNMjAwMTAxMDAwMDAwWhcNNDAwMTAxMDAw
|
||||
+MDAwWjA3MSAwHgYJKoZIhvcNAQkBFhF0YXZpc29AZ29vZ2xlLmNvbTETMBEGA1UE
|
||||
+AxMKYnVnMTczNzQ3MDCCCywwDQYJKoZIhvcNAQEBBQADggsZADCCCxQCggsLAMRE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE
|
||||
+RERERERERERERERERERERERERERERERERERERERERERERERERERERQIDAQABMC4G
|
||||
+CSqGSIb3DQEBCjAhoRowGAYJKoZIhvcNAQEIMAsGCSqGSIb3DQEBCqIDAgEgA4IL
|
||||
+CwAAxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVV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VVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
+VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=
|
||||
+-----END CERTIFICATE-----
|
||||
diff --git a/tests/cert/cert.sh b/tests/cert/cert.sh
|
||||
--- a/tests/cert/cert.sh
|
||||
+++ b/tests/cert/cert.sh
|
||||
@@ -114,16 +114,28 @@ certu()
|
||||
cert_log "ERROR: ${CU_ACTION} failed $RET"
|
||||
else
|
||||
html_passed "${CU_ACTION}"
|
||||
fi
|
||||
|
||||
return $RET
|
||||
}
|
||||
|
||||
+cert_test_vfy()
|
||||
+{
|
||||
+ echo "$SCRIPTNAME: Verify large rsa pss signature --------------"
|
||||
+ echo " vfychain -a Leaf-bogus-dsa.crt"
|
||||
+ vfychain -a ${QADIR}/cert/Leaf-bogus-dsa.crt
|
||||
+ html_msg $? 1 "Verify large dsa signature"
|
||||
+ echo "$SCRIPTNAME: Verify large rsa pss signature --------------"
|
||||
+ echo " vfychain -a Leaf-bogus-rsa-pss.crt"
|
||||
+ vfychain -a ${QADIR}/cert/Leaf-bogus-rsa-pss.crt
|
||||
+ html_msg $? 1 "Verify large rsa pss signature"
|
||||
+}
|
||||
+
|
||||
################################ crlu #################################
|
||||
# local shell function to call crlutil, also: writes action and options to
|
||||
# stdout, sets variable RET and writes results to the html file results
|
||||
########################################################################
|
||||
crlu()
|
||||
{
|
||||
echo "$SCRIPTNAME: ${CU_ACTION} --------------------------"
|
||||
|
||||
@@ -2640,11 +2652,13 @@ if [ -z "$NSS_TEST_DISABLE_CRL" ] ; then
|
||||
else
|
||||
echo "$SCRIPTNAME: Skipping CRL Tests"
|
||||
fi
|
||||
|
||||
if [ -n "$DO_DIST_ST" -a "$DO_DIST_ST" = "TRUE" ] ; then
|
||||
cert_stresscerts
|
||||
fi
|
||||
|
||||
+cert_test_vfy
|
||||
+
|
||||
cert_iopr_setup
|
||||
|
||||
cert_cleanup
|
@ -1,279 +0,0 @@
|
||||
diff --git a/lib/cryptohi/secvfy.c b/lib/cryptohi/secvfy.c
|
||||
--- a/lib/cryptohi/secvfy.c
|
||||
+++ b/lib/cryptohi/secvfy.c
|
||||
@@ -164,6 +164,37 @@
|
||||
PR_FALSE /*XXX: unsafeAllowMissingParameters*/);
|
||||
}
|
||||
|
||||
+static unsigned int
|
||||
+checkedSignatureLen(const SECKEYPublicKey *pubk)
|
||||
+{
|
||||
+ unsigned int sigLen = SECKEY_SignatureLen(pubk);
|
||||
+ if (sigLen == 0) {
|
||||
+ /* Error set by SECKEY_SignatureLen */
|
||||
+ return sigLen;
|
||||
+ }
|
||||
+ unsigned int maxSigLen;
|
||||
+ switch (pubk->keyType) {
|
||||
+ case rsaKey:
|
||||
+ case rsaPssKey:
|
||||
+ maxSigLen = (RSA_MAX_MODULUS_BITS + 7) / 8;
|
||||
+ break;
|
||||
+ case dsaKey:
|
||||
+ maxSigLen = DSA_MAX_SIGNATURE_LEN;
|
||||
+ break;
|
||||
+ case ecKey:
|
||||
+ maxSigLen = 2 * MAX_ECKEY_LEN;
|
||||
+ break;
|
||||
+ default:
|
||||
+ PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (sigLen > maxSigLen) {
|
||||
+ PORT_SetError(SEC_ERROR_INVALID_KEY);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return sigLen;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* decode the ECDSA or DSA signature from it's DER wrapping.
|
||||
* The unwrapped/raw signature is placed in the buffer pointed
|
||||
@@ -174,38 +205,38 @@
|
||||
unsigned int len)
|
||||
{
|
||||
SECItem *dsasig = NULL; /* also used for ECDSA */
|
||||
- SECStatus rv = SECSuccess;
|
||||
|
||||
- if ((algid != SEC_OID_ANSIX9_DSA_SIGNATURE) &&
|
||||
- (algid != SEC_OID_ANSIX962_EC_PUBLIC_KEY)) {
|
||||
- if (sig->len != len) {
|
||||
- PORT_SetError(SEC_ERROR_BAD_DER);
|
||||
- return SECFailure;
|
||||
+ /* Safety: Ensure algId is as expected and that signature size is within maxmimums */
|
||||
+ if (algid == SEC_OID_ANSIX9_DSA_SIGNATURE) {
|
||||
+ if (len > DSA_MAX_SIGNATURE_LEN) {
|
||||
+ goto loser;
|
||||
}
|
||||
-
|
||||
- PORT_Memcpy(dsig, sig->data, sig->len);
|
||||
- return SECSuccess;
|
||||
+ } else if (algid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
|
||||
+ if (len > MAX_ECKEY_LEN * 2) {
|
||||
+ goto loser;
|
||||
+ }
|
||||
+ } else {
|
||||
+ goto loser;
|
||||
}
|
||||
|
||||
- if (algid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
|
||||
- if (len > MAX_ECKEY_LEN * 2) {
|
||||
- PORT_SetError(SEC_ERROR_BAD_DER);
|
||||
- return SECFailure;
|
||||
- }
|
||||
+ /* Decode and pad to length */
|
||||
+ dsasig = DSAU_DecodeDerSigToLen((SECItem *)sig, len);
|
||||
+ if (dsasig == NULL) {
|
||||
+ goto loser;
|
||||
}
|
||||
- dsasig = DSAU_DecodeDerSigToLen((SECItem *)sig, len);
|
||||
-
|
||||
- if ((dsasig == NULL) || (dsasig->len != len)) {
|
||||
- rv = SECFailure;
|
||||
- } else {
|
||||
- PORT_Memcpy(dsig, dsasig->data, dsasig->len);
|
||||
+ if (dsasig->len != len) {
|
||||
+ SECITEM_FreeItem(dsasig, PR_TRUE);
|
||||
+ goto loser;
|
||||
}
|
||||
|
||||
- if (dsasig != NULL)
|
||||
- SECITEM_FreeItem(dsasig, PR_TRUE);
|
||||
- if (rv == SECFailure)
|
||||
- PORT_SetError(SEC_ERROR_BAD_DER);
|
||||
- return rv;
|
||||
+ PORT_Memcpy(dsig, dsasig->data, len);
|
||||
+ SECITEM_FreeItem(dsasig, PR_TRUE);
|
||||
+
|
||||
+ return SECSuccess;
|
||||
+
|
||||
+loser:
|
||||
+ PORT_SetError(SEC_ERROR_BAD_DER);
|
||||
+ return SECFailure;
|
||||
}
|
||||
|
||||
const SEC_ASN1Template hashParameterTemplate[] =
|
||||
@@ -281,7 +312,7 @@
|
||||
sec_DecodeSigAlg(const SECKEYPublicKey *key, SECOidTag sigAlg,
|
||||
const SECItem *param, SECOidTag *encalgp, SECOidTag *hashalg)
|
||||
{
|
||||
- int len;
|
||||
+ unsigned int len;
|
||||
PLArenaPool *arena;
|
||||
SECStatus rv;
|
||||
SECItem oid;
|
||||
@@ -466,48 +497,52 @@
|
||||
cx->pkcs1RSADigestInfo = NULL;
|
||||
rv = SECSuccess;
|
||||
if (sig) {
|
||||
- switch (type) {
|
||||
- case rsaKey:
|
||||
- rv = recoverPKCS1DigestInfo(hashAlg, &cx->hashAlg,
|
||||
- &cx->pkcs1RSADigestInfo,
|
||||
- &cx->pkcs1RSADigestInfoLen,
|
||||
- cx->key,
|
||||
- sig, wincx);
|
||||
- break;
|
||||
- case rsaPssKey:
|
||||
- sigLen = SECKEY_SignatureLen(key);
|
||||
- if (sigLen == 0) {
|
||||
- /* error set by SECKEY_SignatureLen */
|
||||
- rv = SECFailure;
|
||||
+ rv = SECFailure;
|
||||
+ if (type == rsaKey) {
|
||||
+ rv = recoverPKCS1DigestInfo(hashAlg, &cx->hashAlg,
|
||||
+ &cx->pkcs1RSADigestInfo,
|
||||
+ &cx->pkcs1RSADigestInfoLen,
|
||||
+ cx->key,
|
||||
+ sig, wincx);
|
||||
+ } else {
|
||||
+ sigLen = checkedSignatureLen(key);
|
||||
+ /* Check signature length is within limits */
|
||||
+ if (sigLen == 0) {
|
||||
+ /* error set by checkedSignatureLen */
|
||||
+ rv = SECFailure;
|
||||
+ goto loser;
|
||||
+ }
|
||||
+ if (sigLen > sizeof(cx->u)) {
|
||||
+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
+ rv = SECFailure;
|
||||
+ goto loser;
|
||||
+ }
|
||||
+ switch (type) {
|
||||
+ case rsaPssKey:
|
||||
+ if (sig->len != sigLen) {
|
||||
+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
+ rv = SECFailure;
|
||||
+ goto loser;
|
||||
+ }
|
||||
+ PORT_Memcpy(cx->u.buffer, sig->data, sigLen);
|
||||
+ rv = SECSuccess;
|
||||
break;
|
||||
- }
|
||||
- if (sig->len != sigLen) {
|
||||
- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
+ case ecKey:
|
||||
+ case dsaKey:
|
||||
+ /* decodeECorDSASignature will check sigLen == sig->len after padding */
|
||||
+ rv = decodeECorDSASignature(encAlg, sig, cx->u.buffer, sigLen);
|
||||
+ break;
|
||||
+ default:
|
||||
+ /* Unreachable */
|
||||
rv = SECFailure;
|
||||
- break;
|
||||
- }
|
||||
- PORT_Memcpy(cx->u.buffer, sig->data, sigLen);
|
||||
- break;
|
||||
- case dsaKey:
|
||||
- case ecKey:
|
||||
- sigLen = SECKEY_SignatureLen(key);
|
||||
- if (sigLen == 0) {
|
||||
- /* error set by SECKEY_SignatureLen */
|
||||
- rv = SECFailure;
|
||||
- break;
|
||||
- }
|
||||
- rv = decodeECorDSASignature(encAlg, sig, cx->u.buffer, sigLen);
|
||||
- break;
|
||||
- default:
|
||||
- rv = SECFailure;
|
||||
- PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
|
||||
- break;
|
||||
+ goto loser;
|
||||
+ }
|
||||
+ }
|
||||
+ if (rv != SECSuccess) {
|
||||
+ goto loser;
|
||||
}
|
||||
}
|
||||
|
||||
- if (rv)
|
||||
- goto loser;
|
||||
-
|
||||
/* check hash alg again, RSA may have changed it.*/
|
||||
if (HASH_GetHashTypeByOidTag(cx->hashAlg) == HASH_AlgNULL) {
|
||||
/* error set by HASH_GetHashTypeByOidTag */
|
||||
@@ -650,11 +685,16 @@
|
||||
switch (cx->key->keyType) {
|
||||
case ecKey:
|
||||
case dsaKey:
|
||||
- dsasig.data = cx->u.buffer;
|
||||
- dsasig.len = SECKEY_SignatureLen(cx->key);
|
||||
+ dsasig.len = checkedSignatureLen(cx->key);
|
||||
if (dsasig.len == 0) {
|
||||
return SECFailure;
|
||||
}
|
||||
+ if (dsasig.len > sizeof(cx->u)) {
|
||||
+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
+ return SECFailure;
|
||||
+ }
|
||||
+ dsasig.data = cx->u.buffer;
|
||||
+
|
||||
if (sig) {
|
||||
rv = decodeECorDSASignature(cx->encAlg, sig, dsasig.data,
|
||||
dsasig.len);
|
||||
@@ -686,8 +726,13 @@
|
||||
}
|
||||
|
||||
rsasig.data = cx->u.buffer;
|
||||
- rsasig.len = SECKEY_SignatureLen(cx->key);
|
||||
+ rsasig.len = checkedSignatureLen(cx->key);
|
||||
if (rsasig.len == 0) {
|
||||
+ /* Error set by checkedSignatureLen */
|
||||
+ return SECFailure;
|
||||
+ }
|
||||
+ if (rsasig.len > sizeof(cx->u)) {
|
||||
+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
return SECFailure;
|
||||
}
|
||||
if (sig) {
|
||||
@@ -749,7 +794,6 @@
|
||||
SECStatus rv;
|
||||
VFYContext *cx;
|
||||
SECItem dsasig; /* also used for ECDSA */
|
||||
-
|
||||
rv = SECFailure;
|
||||
|
||||
cx = vfy_CreateContext(key, sig, encAlg, hashAlg, NULL, wincx);
|
||||
@@ -757,19 +801,25 @@
|
||||
switch (key->keyType) {
|
||||
case rsaKey:
|
||||
rv = verifyPKCS1DigestInfo(cx, digest);
|
||||
+ /* Error (if any) set by verifyPKCS1DigestInfo */
|
||||
break;
|
||||
- case dsaKey:
|
||||
case ecKey:
|
||||
+ case dsaKey:
|
||||
dsasig.data = cx->u.buffer;
|
||||
- dsasig.len = SECKEY_SignatureLen(cx->key);
|
||||
+ dsasig.len = checkedSignatureLen(cx->key);
|
||||
if (dsasig.len == 0) {
|
||||
+ /* Error set by checkedSignatureLen */
|
||||
+ rv = SECFailure;
|
||||
break;
|
||||
}
|
||||
- if (PK11_Verify(cx->key, &dsasig, (SECItem *)digest, cx->wincx) !=
|
||||
- SECSuccess) {
|
||||
+ if (dsasig.len > sizeof(cx->u)) {
|
||||
PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
- } else {
|
||||
- rv = SECSuccess;
|
||||
+ rv = SECFailure;
|
||||
+ break;
|
||||
+ }
|
||||
+ rv = PK11_Verify(cx->key, &dsasig, (SECItem *)digest, cx->wincx);
|
||||
+ if (rv != SECSuccess) {
|
||||
+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -1,45 +0,0 @@
|
||||
diff -up ./lib/pk11wrap/pk11cxt.c.coverity ./lib/pk11wrap/pk11cxt.c
|
||||
--- ./lib/pk11wrap/pk11cxt.c.coverity 2021-06-18 09:36:19.499203028 -0700
|
||||
+++ ./lib/pk11wrap/pk11cxt.c 2021-06-18 09:37:57.993765299 -0700
|
||||
@@ -382,7 +382,7 @@ pk11_CreateNewContextInSlot(CK_MECHANISM
|
||||
* of the connection.*/
|
||||
context->fortezzaHack = PR_FALSE;
|
||||
if (type == CKM_SKIPJACK_CBC64) {
|
||||
- if (symKey->origin == PK11_OriginFortezzaHack) {
|
||||
+ if (symKey && (symKey->origin == PK11_OriginFortezzaHack)) {
|
||||
context->fortezzaHack = PR_TRUE;
|
||||
}
|
||||
}
|
||||
diff -up ./lib/pk11wrap/pk11hpke.c.coverity ./lib/pk11wrap/pk11hpke.c
|
||||
--- ./lib/pk11wrap/pk11hpke.c.coverity 2021-06-18 13:40:05.410644464 -0700
|
||||
+++ ./lib/pk11wrap/pk11hpke.c 2021-06-18 13:42:40.627606469 -0700
|
||||
@@ -1164,8 +1164,6 @@ PK11_HPKE_Seal(HpkeContext *cx, const SE
|
||||
unsigned char tagBuf[HASH_LENGTH_MAX];
|
||||
size_t tagLen;
|
||||
unsigned int fixedBits;
|
||||
- PORT_Assert(cx->baseNonce->len == sizeof(ivOut));
|
||||
- PORT_Memcpy(ivOut, cx->baseNonce->data, cx->baseNonce->len);
|
||||
|
||||
/* aad may be NULL, PT may be zero-length but not NULL. */
|
||||
if (!cx || !cx->aeadContext ||
|
||||
@@ -1176,6 +1174,9 @@ PK11_HPKE_Seal(HpkeContext *cx, const SE
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
+ PORT_Assert(cx->baseNonce->len == sizeof(ivOut));
|
||||
+ PORT_Memcpy(ivOut, cx->baseNonce->data, cx->baseNonce->len);
|
||||
+
|
||||
tagLen = cx->aeadParams->tagLen;
|
||||
maxOut = pt->len + tagLen;
|
||||
fixedBits = (cx->baseNonce->len - 8) * 8;
|
||||
diff -up ./lib/softoken/sftkike.c.coverity ./lib/softoken/sftkike.c
|
||||
--- ./lib/softoken/sftkike.c.coverity 2021-06-18 09:33:59.633405513 -0700
|
||||
+++ ./lib/softoken/sftkike.c 2021-06-18 09:34:20.305523382 -0700
|
||||
@@ -1411,7 +1411,6 @@ sftk_fips_IKE_PowerUpSelfTests(void)
|
||||
(outKeySize != sizeof(ike_known_sha256_prf_plus)) ||
|
||||
(PORT_Memcmp(outKeyData, ike_known_sha256_prf_plus,
|
||||
sizeof(ike_known_sha256_prf_plus)) != 0)) {
|
||||
- PORT_ZFree(outKeyData, outKeySize);
|
||||
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
|
||||
return SECFailure;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
diff -up ./lib/softoken/sftkpwd.c.orig ./lib/softoken/sftkpwd.c
|
||||
--- ./lib/softoken/sftkpwd.c.orig 2021-06-10 05:33:12.000000000 -0700
|
||||
+++ ./lib/softoken/sftkpwd.c 2021-07-01 14:04:34.068596942 -0700
|
||||
@@ -287,9 +287,12 @@ sftkdb_DecryptAttribute(SFTKDBHandle *ha
|
||||
}
|
||||
|
||||
/* If we are using aes 256, we need to check authentication as well.*/
|
||||
- if ((type != CKT_INVALID_TYPE) && (cipherValue.alg == SEC_OID_AES_256_CBC)) {
|
||||
+ if ((type != CKT_INVALID_TYPE) &&
|
||||
+ (cipherValue.alg == SEC_OID_PKCS5_PBES2) &&
|
||||
+ (cipherValue.param->encAlg == SEC_OID_AES_256_CBC)) {
|
||||
SECItem signature;
|
||||
unsigned char signData[SDB_MAX_META_DATA_LEN];
|
||||
+ CK_RV crv;
|
||||
|
||||
/* if we get here from the old legacy db, there is clearly an
|
||||
* error, don't return the plaintext */
|
||||
@@ -301,15 +304,28 @@ sftkdb_DecryptAttribute(SFTKDBHandle *ha
|
||||
|
||||
signature.data = signData;
|
||||
signature.len = sizeof(signData);
|
||||
- rv = sftkdb_GetAttributeSignature(handle, handle, id, type,
|
||||
+ rv = SECFailure;
|
||||
+ /* sign sftkdb_GetAttriibuteSignature returns a crv, not an rv */
|
||||
+ crv = sftkdb_GetAttributeSignature(handle, handle, id, type,
|
||||
&signature);
|
||||
- if (rv != SECSuccess) {
|
||||
- goto loser;
|
||||
+ if (crv == CKR_OK) {
|
||||
+ rv = sftkdb_VerifyAttribute(handle, passKey, CK_INVALID_HANDLE,
|
||||
+ type, *plain, &signature);
|
||||
}
|
||||
- rv = sftkdb_VerifyAttribute(handle, passKey, CK_INVALID_HANDLE, type,
|
||||
- *plain, &signature);
|
||||
if (rv != SECSuccess) {
|
||||
- goto loser;
|
||||
+ /* handle a bug where old versions of NSS misfiled the signature
|
||||
+ * attribute on password update */
|
||||
+ id |= SFTK_KEYDB_TYPE|SFTK_TOKEN_TYPE;
|
||||
+ signature.len = sizeof(signData);
|
||||
+ crv = sftkdb_GetAttributeSignature(handle, handle, id, type,
|
||||
+ &signature);
|
||||
+ if (crv != CKR_OK) {
|
||||
+ rv = SECFailure;
|
||||
+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
|
||||
+ goto loser;
|
||||
+ }
|
||||
+ rv = sftkdb_VerifyAttribute(handle, passKey, CK_INVALID_HANDLE,
|
||||
+ type, *plain, &signature);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1198,6 +1214,7 @@ sftk_updateEncrypted(PLArenaPool *arena,
|
||||
unsigned int i;
|
||||
for (i = 0; i < privAttrCount; i++) {
|
||||
// Read the old attribute in the clear.
|
||||
+ CK_OBJECT_HANDLE sdbId = id & SFTK_OBJ_ID_MASK;
|
||||
CK_ATTRIBUTE privAttr = { privAttrTypes[i], NULL, 0 };
|
||||
CK_RV crv = sftkdb_GetAttributeValue(keydb, id, &privAttr, 1);
|
||||
if (crv != CKR_OK) {
|
||||
@@ -1222,7 +1239,7 @@ sftk_updateEncrypted(PLArenaPool *arena,
|
||||
plainText.data = privAttr.pValue;
|
||||
plainText.len = privAttr.ulValueLen;
|
||||
if (sftkdb_EncryptAttribute(arena, keydb, keydb->db, newKey,
|
||||
- iterationCount, id, privAttr.type,
|
||||
+ iterationCount, sdbId, privAttr.type,
|
||||
&plainText, &result) != SECSuccess) {
|
||||
return CKR_GENERAL_ERROR;
|
||||
}
|
||||
@@ -1232,10 +1249,9 @@ sftk_updateEncrypted(PLArenaPool *arena,
|
||||
PORT_Memset(plainText.data, 0, plainText.len);
|
||||
|
||||
// Write the newly encrypted attributes out directly.
|
||||
- CK_OBJECT_HANDLE newId = id & SFTK_OBJ_ID_MASK;
|
||||
keydb->newKey = newKey;
|
||||
keydb->newDefaultIterationCount = iterationCount;
|
||||
- crv = (*keydb->db->sdb_SetAttributeValue)(keydb->db, newId, &privAttr, 1);
|
||||
+ crv = (*keydb->db->sdb_SetAttributeValue)(keydb->db, sdbId, &privAttr, 1);
|
||||
keydb->newKey = NULL;
|
||||
if (crv != CKR_OK) {
|
||||
return crv;
|
@ -1,63 +0,0 @@
|
||||
diff --git a/lib/softoken/sdb.c b/lib/softoken/sdb.c
|
||||
--- a/lib/softoken/sdb.c
|
||||
+++ b/lib/softoken/sdb.c
|
||||
@@ -1519,16 +1519,18 @@ sdb_Begin(SDB *sdb)
|
||||
|
||||
sqlerr = sqlite3_prepare_v2(sqlDB, BEGIN_CMD, -1, &stmt, NULL);
|
||||
|
||||
do {
|
||||
sqlerr = sqlite3_step(stmt);
|
||||
if (sqlerr == SQLITE_BUSY) {
|
||||
PR_Sleep(SDB_BUSY_RETRY_TIME);
|
||||
}
|
||||
+ /* don't retry BEGIN transaction*/
|
||||
+ retry = 0;
|
||||
} while (!sdb_done(sqlerr, &retry));
|
||||
|
||||
if (stmt) {
|
||||
sqlite3_reset(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
|
||||
loser:
|
||||
diff --git a/lib/softoken/sftkdb.c b/lib/softoken/sftkdb.c
|
||||
--- a/lib/softoken/sftkdb.c
|
||||
+++ b/lib/softoken/sftkdb.c
|
||||
@@ -1521,17 +1521,17 @@ sftkdb_DestroyObject(SFTKDBHandle *handl
|
||||
if (handle == NULL) {
|
||||
return CKR_TOKEN_WRITE_PROTECTED;
|
||||
}
|
||||
db = SFTK_GET_SDB(handle);
|
||||
objectID &= SFTK_OBJ_ID_MASK;
|
||||
|
||||
crv = (*db->sdb_Begin)(db);
|
||||
if (crv != CKR_OK) {
|
||||
- goto loser;
|
||||
+ return crv;
|
||||
}
|
||||
crv = (*db->sdb_DestroyObject)(db, objectID);
|
||||
if (crv != CKR_OK) {
|
||||
goto loser;
|
||||
}
|
||||
/* if the database supports meta data, delete any old signatures
|
||||
* that we may have added */
|
||||
if ((db->sdb_flags & SDB_HAS_META) == SDB_HAS_META) {
|
||||
@@ -2456,17 +2456,17 @@ sftkdb_Update(SFTKDBHandle *handle, SECI
|
||||
return CKR_OK;
|
||||
}
|
||||
/*
|
||||
* put the whole update under a transaction. This allows us to handle
|
||||
* any possible race conditions between with the updateID check.
|
||||
*/
|
||||
crv = (*handle->db->sdb_Begin)(handle->db);
|
||||
if (crv != CKR_OK) {
|
||||
- goto loser;
|
||||
+ return crv;
|
||||
}
|
||||
inTransaction = PR_TRUE;
|
||||
|
||||
/* some one else has already updated this db */
|
||||
if (sftkdb_hasUpdate(sftkdb_TypeString(handle),
|
||||
handle->db, handle->updateID)) {
|
||||
crv = CKR_OK;
|
||||
goto done;
|
@ -1,122 +0,0 @@
|
||||
diff -up ./lib/ssl/ssl3con.c.alert-fix ./lib/ssl/ssl3con.c
|
||||
--- ./lib/ssl/ssl3con.c.alert-fix 2021-06-10 05:33:12.000000000 -0700
|
||||
+++ ./lib/ssl/ssl3con.c 2021-07-06 17:08:25.894018521 -0700
|
||||
@@ -4319,7 +4319,11 @@ ssl_SignatureSchemeValid(SSLSignatureSch
|
||||
if (!ssl_IsSupportedSignatureScheme(scheme)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
- if (!ssl_SignatureSchemeMatchesSpkiOid(scheme, spkiOid)) {
|
||||
+ /* if we are purposefully passed SEC_OID_UNKOWN, it means
|
||||
+ * we not checking the scheme against a potential key, so skip
|
||||
+ * the call */
|
||||
+ if ((spkiOid != SEC_OID_UNKNOWN) &&
|
||||
+ !ssl_SignatureSchemeMatchesSpkiOid(scheme, spkiOid)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
if (isTls13) {
|
||||
@@ -4517,7 +4521,8 @@ ssl_CheckSignatureSchemeConsistency(sslS
|
||||
}
|
||||
|
||||
/* Verify that the signature scheme matches the signing key. */
|
||||
- if (!ssl_SignatureSchemeValid(scheme, spkiOid, isTLS13)) {
|
||||
+ if ((spkiOid == SEC_OID_UNKNOWN) ||
|
||||
+ !ssl_SignatureSchemeValid(scheme, spkiOid, isTLS13)) {
|
||||
PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM);
|
||||
return SECFailure;
|
||||
}
|
||||
@@ -4533,6 +4538,7 @@ ssl_CheckSignatureSchemeConsistency(sslS
|
||||
PRBool
|
||||
ssl_IsSupportedSignatureScheme(SSLSignatureScheme scheme)
|
||||
{
|
||||
+ PRBool isSupported = PR_FALSE;
|
||||
switch (scheme) {
|
||||
case ssl_sig_rsa_pkcs1_sha1:
|
||||
case ssl_sig_rsa_pkcs1_sha256:
|
||||
@@ -4552,7 +4558,8 @@ ssl_IsSupportedSignatureScheme(SSLSignat
|
||||
case ssl_sig_dsa_sha384:
|
||||
case ssl_sig_dsa_sha512:
|
||||
case ssl_sig_ecdsa_sha1:
|
||||
- return PR_TRUE;
|
||||
+ isSupported = PR_TRUE;
|
||||
+ break;
|
||||
|
||||
case ssl_sig_rsa_pkcs1_sha1md5:
|
||||
case ssl_sig_none:
|
||||
@@ -4560,7 +4567,19 @@ ssl_IsSupportedSignatureScheme(SSLSignat
|
||||
case ssl_sig_ed448:
|
||||
return PR_FALSE;
|
||||
}
|
||||
- return PR_FALSE;
|
||||
+ if (isSupported) {
|
||||
+ SECOidTag hashOID = ssl3_HashTypeToOID(ssl_SignatureSchemeToHashType(scheme));
|
||||
+ PRUint32 policy;
|
||||
+ const PRUint32 sigSchemePolicy=
|
||||
+ NSS_USE_ALG_IN_SSL_KX|NSS_USE_ALG_IN_SIGNATURE;
|
||||
+ /* check hash policy */
|
||||
+ if ((NSS_GetAlgorithmPolicy(hashOID, &policy) == SECSuccess) &&
|
||||
+ ((policy & sigSchemePolicy) != sigSchemePolicy)) {
|
||||
+ return PR_FALSE;
|
||||
+ }
|
||||
+ /* check algorithm policy */
|
||||
+ }
|
||||
+ return isSupported;
|
||||
}
|
||||
|
||||
PRBool
|
||||
@@ -6533,6 +6552,9 @@ ssl_PickSignatureScheme(sslSocket *ss,
|
||||
}
|
||||
|
||||
spkiOid = SECOID_GetAlgorithmTag(&cert->subjectPublicKeyInfo.algorithm);
|
||||
+ if (spkiOid == SEC_OID_UNKNOWN) {
|
||||
+ goto loser;
|
||||
+ }
|
||||
|
||||
/* Now we have to search based on the key type. Go through our preferred
|
||||
* schemes in order and find the first that can be used. */
|
||||
@@ -6547,6 +6569,7 @@ ssl_PickSignatureScheme(sslSocket *ss,
|
||||
}
|
||||
}
|
||||
|
||||
+loser:
|
||||
PORT_SetError(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM);
|
||||
return SECFailure;
|
||||
}
|
||||
@@ -7700,7 +7723,8 @@ ssl_ParseSignatureSchemes(const sslSocke
|
||||
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
|
||||
return SECFailure;
|
||||
}
|
||||
- if (ssl_IsSupportedSignatureScheme((SSLSignatureScheme)tmp)) {
|
||||
+ if (ssl_SignatureSchemeValid((SSLSignatureScheme)tmp, SEC_OID_UNKNOWN,
|
||||
+ (PRBool)ss->version >= SSL_LIBRARY_VERSION_TLS_1_3)) {;
|
||||
schemes[numSupported++] = (SSLSignatureScheme)tmp;
|
||||
}
|
||||
}
|
||||
@@ -10286,7 +10310,12 @@ ssl3_HandleCertificateVerify(sslSocket *
|
||||
PORT_Assert(ss->ssl3.hs.hashType == handshake_hash_record);
|
||||
rv = ssl_ConsumeSignatureScheme(ss, &b, &length, &sigScheme);
|
||||
if (rv != SECSuccess) {
|
||||
- goto loser; /* malformed or unsupported. */
|
||||
+ errCode = PORT_GetError();
|
||||
+ /* unsupported == illegal_parameter, others == handshake_failure. */
|
||||
+ if (errCode == SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM) {
|
||||
+ desc = illegal_parameter;
|
||||
+ }
|
||||
+ goto alert_loser;
|
||||
}
|
||||
rv = ssl_CheckSignatureSchemeConsistency(
|
||||
ss, sigScheme, &ss->sec.peerCert->subjectPublicKeyInfo);
|
||||
diff -up ./gtests/ssl_gtest/ssl_extension_unittest.cc.alert-fix ./gtests/ssl_gtest/ssl_extension_unittest.cc
|
||||
--- ./gtests/ssl_gtest/ssl_extension_unittest.cc.alert-fix 2021-07-07 11:32:11.634376932 -0700
|
||||
+++ ./gtests/ssl_gtest/ssl_extension_unittest.cc 2021-07-07 11:33:30.595841110 -0700
|
||||
@@ -428,7 +428,10 @@ TEST_P(TlsExtensionTest12Plus, Signature
|
||||
}
|
||||
|
||||
TEST_P(TlsExtensionTest12Plus, SignatureAlgorithmsTrailingData) {
|
||||
- const uint8_t val[] = {0x00, 0x02, 0x04, 0x01, 0x00}; // sha-256, rsa
|
||||
+ // make sure the test uses an algorithm that is legal for
|
||||
+ // tls 1.3 (or tls 1.3 will through and illegalParameter
|
||||
+ // instead of a decode error)
|
||||
+ const uint8_t val[] = {0x00, 0x02, 0x08, 0x09, 0x00}; // sha-256, rsa-pss-pss
|
||||
DataBuffer extension(val, sizeof(val));
|
||||
ClientHelloErrorTest(std::make_shared<TlsExtensionReplacer>(
|
||||
client_, ssl_signature_algorithms_xtn, extension));
|
3411
SOURCES/nss-3.79-dbtool.patch
Normal file
3411
SOURCES/nss-3.79-dbtool.patch
Normal file
File diff suppressed because it is too large
Load Diff
375
SOURCES/nss-3.79-distrusted-certs.patch
Normal file
375
SOURCES/nss-3.79-distrusted-certs.patch
Normal file
@ -0,0 +1,375 @@
|
||||
# HG changeset patch
|
||||
# User John M. Schanck <jschanck@mozilla.com>
|
||||
# Date 1648094761 0
|
||||
# Thu Mar 24 04:06:01 2022 +0000
|
||||
# Node ID b722e523d66297fe4bc1fac0ebb06203138eccbb
|
||||
# Parent 853b64626b19a46f41f4ba9c684490dc15923c94
|
||||
Bug 1751305 - Remove expired explicitly distrusted certificates from certdata.txt. r=KathleenWilson
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D141919
|
||||
|
||||
diff --git a/lib/ckfw/builtins/certdata.txt b/lib/ckfw/builtins/certdata.txt
|
||||
--- a/lib/ckfw/builtins/certdata.txt
|
||||
+++ b/lib/ckfw/builtins/certdata.txt
|
||||
@@ -7663,197 +7663,16 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
\377\377
|
||||
END
|
||||
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
|
||||
#
|
||||
-# Certificate "Explicitly Distrusted DigiNotar PKIoverheid G2"
|
||||
-#
|
||||
-# Issuer: CN=DigiNotar PKIoverheid CA Organisatie - G2,O=DigiNotar B.V.,C=NL
|
||||
-# Serial Number: 268435455 (0xfffffff)
|
||||
-# Subject: CN=DigiNotar PKIoverheid CA Organisatie - G2,O=DigiNotar B.V.,C=NL
|
||||
-# Not Valid Before: Wed May 12 08:51:39 2010
|
||||
-# Not Valid After : Mon Mar 23 09:50:05 2020
|
||||
-# Fingerprint (MD5): 2E:61:A2:D1:78:CE:EE:BF:59:33:B0:23:14:0F:94:1C
|
||||
-# Fingerprint (SHA1): D5:F2:57:A9:BF:2D:D0:3F:8B:46:57:F9:2B:C9:A4:C6:92:E1:42:42
|
||||
-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
|
||||
-CKA_TOKEN CK_BBOOL CK_TRUE
|
||||
-CKA_PRIVATE CK_BBOOL CK_FALSE
|
||||
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
|
||||
-CKA_LABEL UTF8 "Explicitly Distrusted DigiNotar PKIoverheid G2"
|
||||
-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
|
||||
-CKA_SUBJECT MULTILINE_OCTAL
|
||||
-\060\132\061\013\060\011\006\003\125\004\006\023\002\116\114\061
|
||||
-\027\060\025\006\003\125\004\012\014\016\104\151\147\151\116\157
|
||||
-\164\141\162\040\102\056\126\056\061\062\060\060\006\003\125\004
|
||||
-\003\014\051\104\151\147\151\116\157\164\141\162\040\120\113\111
|
||||
-\157\166\145\162\150\145\151\144\040\103\101\040\117\162\147\141
|
||||
-\156\151\163\141\164\151\145\040\055\040\107\062
|
||||
-END
|
||||
-CKA_ID UTF8 "0"
|
||||
-CKA_ISSUER MULTILINE_OCTAL
|
||||
-\060\132\061\013\060\011\006\003\125\004\006\023\002\116\114\061
|
||||
-\027\060\025\006\003\125\004\012\014\016\104\151\147\151\116\157
|
||||
-\164\141\162\040\102\056\126\056\061\062\060\060\006\003\125\004
|
||||
-\003\014\051\104\151\147\151\116\157\164\141\162\040\120\113\111
|
||||
-\157\166\145\162\150\145\151\144\040\103\101\040\117\162\147\141
|
||||
-\156\151\163\141\164\151\145\040\055\040\107\062
|
||||
-END
|
||||
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
-\002\004\017\377\377\377
|
||||
-END
|
||||
-CKA_VALUE MULTILINE_OCTAL
|
||||
-\060\202\006\225\060\202\004\175\240\003\002\001\002\002\004\017
|
||||
-\377\377\377\060\015\006\011\052\206\110\206\367\015\001\001\013
|
||||
-\005\000\060\132\061\013\060\011\006\003\125\004\006\023\002\116
|
||||
-\114\061\027\060\025\006\003\125\004\012\014\016\104\151\147\151
|
||||
-\116\157\164\141\162\040\102\056\126\056\061\062\060\060\006\003
|
||||
-\125\004\003\014\051\104\151\147\151\116\157\164\141\162\040\120
|
||||
-\113\111\157\166\145\162\150\145\151\144\040\103\101\040\117\162
|
||||
-\147\141\156\151\163\141\164\151\145\040\055\040\107\062\060\036
|
||||
-\027\015\061\060\060\065\061\062\060\070\065\061\063\071\132\027
|
||||
-\015\062\060\060\063\062\063\060\071\065\060\060\065\132\060\132
|
||||
-\061\013\060\011\006\003\125\004\006\023\002\116\114\061\027\060
|
||||
-\025\006\003\125\004\012\014\016\104\151\147\151\116\157\164\141
|
||||
-\162\040\102\056\126\056\061\062\060\060\006\003\125\004\003\014
|
||||
-\051\104\151\147\151\116\157\164\141\162\040\120\113\111\157\166
|
||||
-\145\162\150\145\151\144\040\103\101\040\117\162\147\141\156\151
|
||||
-\163\141\164\151\145\040\055\040\107\062\060\202\002\042\060\015
|
||||
-\006\011\052\206\110\206\367\015\001\001\001\005\000\003\202\002
|
||||
-\017\000\060\202\002\012\002\202\002\001\000\261\023\031\017\047
|
||||
-\346\154\324\125\206\113\320\354\211\212\105\221\170\254\107\275
|
||||
-\107\053\344\374\105\353\117\264\046\163\133\067\323\303\177\366
|
||||
-\343\336\327\243\370\055\150\305\010\076\113\224\326\344\207\045
|
||||
-\066\153\204\265\030\164\363\050\130\163\057\233\152\317\274\004
|
||||
-\036\366\336\335\257\374\113\252\365\333\146\142\045\001\045\202
|
||||
-\336\362\227\132\020\156\335\135\251\042\261\004\251\043\163\072
|
||||
-\370\161\255\035\317\204\104\353\107\321\257\155\310\174\050\253
|
||||
-\307\362\067\172\164\137\137\305\002\024\212\243\132\343\033\154
|
||||
-\001\343\135\216\331\150\326\364\011\033\062\334\221\265\054\365
|
||||
-\040\353\214\003\155\046\111\270\223\304\205\135\330\322\233\257
|
||||
-\126\152\314\005\063\314\240\102\236\064\125\104\234\153\240\324
|
||||
-\022\320\053\124\315\267\211\015\345\366\353\350\373\205\001\063
|
||||
-\117\172\153\361\235\162\063\226\016\367\262\204\245\245\047\304
|
||||
-\047\361\121\163\051\167\272\147\156\376\114\334\264\342\241\241
|
||||
-\201\057\071\111\215\103\070\023\316\320\245\134\302\207\072\000
|
||||
-\147\145\102\043\361\066\131\012\035\243\121\310\274\243\224\052
|
||||
-\061\337\343\074\362\235\032\074\004\260\357\261\012\060\023\163
|
||||
-\266\327\363\243\114\001\165\024\205\170\300\327\212\071\130\205
|
||||
-\120\372\056\346\305\276\317\213\077\257\217\066\324\045\011\055
|
||||
-\322\017\254\162\223\362\277\213\324\120\263\371\025\120\233\231
|
||||
-\365\024\331\373\213\221\243\062\046\046\240\370\337\073\140\201
|
||||
-\206\203\171\133\053\353\023\075\051\072\301\155\335\275\236\216
|
||||
-\207\326\112\256\064\227\005\356\024\246\366\334\070\176\112\351
|
||||
-\044\124\007\075\227\150\067\106\153\015\307\250\041\257\023\124
|
||||
-\344\011\152\361\115\106\012\311\135\373\233\117\275\336\373\267
|
||||
-\124\313\270\070\234\247\071\373\152\055\300\173\215\253\245\247
|
||||
-\127\354\112\222\212\063\305\341\040\134\163\330\220\222\053\200
|
||||
-\325\017\206\030\151\174\071\117\204\206\274\367\114\133\363\325
|
||||
-\264\312\240\302\360\067\042\312\171\122\037\123\346\252\363\220
|
||||
-\260\073\335\362\050\375\254\353\305\006\044\240\311\324\057\017
|
||||
-\130\375\265\236\354\017\317\262\131\320\242\004\172\070\152\256
|
||||
-\162\373\275\360\045\142\224\011\247\005\013\002\003\001\000\001
|
||||
-\243\202\001\141\060\202\001\135\060\110\006\003\125\035\040\004
|
||||
-\101\060\077\060\075\006\004\125\035\040\000\060\065\060\063\006
|
||||
-\010\053\006\001\005\005\007\002\001\026\047\150\164\164\160\072
|
||||
-\057\057\167\167\167\056\144\151\147\151\156\157\164\141\162\056
|
||||
-\156\154\057\143\160\163\057\160\153\151\157\166\145\162\150\145
|
||||
-\151\144\060\017\006\003\125\035\023\001\001\377\004\005\060\003
|
||||
-\001\001\377\060\016\006\003\125\035\017\001\001\377\004\004\003
|
||||
-\002\001\006\060\201\205\006\003\125\035\043\004\176\060\174\200
|
||||
-\024\071\020\213\111\222\134\333\141\022\040\315\111\235\032\216
|
||||
-\332\234\147\100\271\241\136\244\134\060\132\061\013\060\011\006
|
||||
-\003\125\004\006\023\002\116\114\061\036\060\034\006\003\125\004
|
||||
-\012\014\025\123\164\141\141\164\040\144\145\162\040\116\145\144
|
||||
-\145\162\154\141\156\144\145\156\061\053\060\051\006\003\125\004
|
||||
-\003\014\042\123\164\141\141\164\040\144\145\162\040\116\145\144
|
||||
-\145\162\154\141\156\144\145\156\040\122\157\157\164\040\103\101
|
||||
-\040\055\040\107\062\202\004\000\230\226\364\060\111\006\003\125
|
||||
-\035\037\004\102\060\100\060\076\240\074\240\072\206\070\150\164
|
||||
-\164\160\072\057\057\143\162\154\056\160\153\151\157\166\145\162
|
||||
-\150\145\151\144\056\156\154\057\104\157\155\117\162\147\141\156
|
||||
-\151\163\141\164\151\145\114\141\164\145\163\164\103\122\114\055
|
||||
-\107\062\056\143\162\154\060\035\006\003\125\035\016\004\026\004
|
||||
-\024\274\135\224\073\331\253\173\003\045\163\141\302\333\055\356
|
||||
-\374\253\217\145\241\060\015\006\011\052\206\110\206\367\015\001
|
||||
-\001\013\005\000\003\202\002\001\000\217\374\055\114\267\331\055
|
||||
-\325\037\275\357\313\364\267\150\027\165\235\116\325\367\335\234
|
||||
-\361\052\046\355\237\242\266\034\003\325\123\263\354\010\317\064
|
||||
-\342\343\303\364\265\026\057\310\303\276\327\323\163\253\000\066
|
||||
-\371\032\112\176\326\143\351\136\106\272\245\266\216\025\267\243
|
||||
-\052\330\103\035\357\135\310\037\201\205\263\213\367\377\074\364
|
||||
-\331\364\106\010\077\234\274\035\240\331\250\114\315\045\122\116
|
||||
-\012\261\040\367\037\351\103\331\124\106\201\023\232\300\136\164
|
||||
-\154\052\230\062\352\374\167\273\015\245\242\061\230\042\176\174
|
||||
-\174\347\332\244\255\354\267\056\032\031\161\370\110\120\332\103
|
||||
-\217\054\204\335\301\100\047\343\265\360\025\116\226\324\370\134
|
||||
-\343\206\051\106\053\327\073\007\353\070\177\310\206\127\227\323
|
||||
-\357\052\063\304\027\120\325\144\151\153\053\153\105\136\135\057
|
||||
-\027\312\132\116\317\303\327\071\074\365\073\237\106\271\233\347
|
||||
-\016\111\227\235\326\325\343\033\017\352\217\001\116\232\023\224
|
||||
-\131\012\002\007\110\113\032\140\253\177\117\355\013\330\125\015
|
||||
-\150\157\125\234\151\145\025\102\354\300\334\335\154\254\303\026
|
||||
-\316\013\035\126\233\244\304\304\322\056\340\017\342\104\047\053
|
||||
-\120\151\244\334\142\350\212\041\051\102\154\314\000\072\226\166
|
||||
-\233\357\100\300\244\136\167\204\062\154\046\052\071\146\256\135
|
||||
-\343\271\271\262\054\150\037\036\232\220\003\071\360\252\263\244
|
||||
-\314\111\213\030\064\351\067\311\173\051\307\204\174\157\104\025
|
||||
-\057\354\141\131\004\311\105\313\242\326\122\242\174\177\051\222
|
||||
-\326\112\305\213\102\250\324\376\352\330\307\207\043\030\344\235
|
||||
-\172\175\163\100\122\230\240\256\156\343\005\077\005\017\340\245
|
||||
-\306\155\115\355\203\067\210\234\307\363\334\102\232\152\266\327
|
||||
-\041\111\066\167\362\357\030\117\305\160\331\236\351\336\267\053
|
||||
-\213\364\274\176\050\337\015\100\311\205\134\256\235\305\061\377
|
||||
-\320\134\016\265\250\176\360\351\057\272\257\210\256\345\265\321
|
||||
-\130\245\257\234\161\247\051\001\220\203\151\067\202\005\272\374
|
||||
-\011\301\010\156\214\170\073\303\063\002\200\077\104\205\010\035
|
||||
-\337\125\126\010\255\054\205\055\135\261\003\341\256\252\164\305
|
||||
-\244\363\116\272\067\230\173\202\271
|
||||
-END
|
||||
-
|
||||
-# Trust for Certificate "Explicitly Distrusted DigiNotar PKIoverheid G2"
|
||||
-# Issuer: CN=DigiNotar PKIoverheid CA Organisatie - G2,O=DigiNotar B.V.,C=NL
|
||||
-# Serial Number: 268435455 (0xfffffff)
|
||||
-# Subject: CN=DigiNotar PKIoverheid CA Organisatie - G2,O=DigiNotar B.V.,C=NL
|
||||
-# Not Valid Before: Wed May 12 08:51:39 2010
|
||||
-# Not Valid After : Mon Mar 23 09:50:05 2020
|
||||
-# Fingerprint (MD5): 2E:61:A2:D1:78:CE:EE:BF:59:33:B0:23:14:0F:94:1C
|
||||
-# Fingerprint (SHA1): D5:F2:57:A9:BF:2D:D0:3F:8B:46:57:F9:2B:C9:A4:C6:92:E1:42:42
|
||||
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
|
||||
-CKA_TOKEN CK_BBOOL CK_TRUE
|
||||
-CKA_PRIVATE CK_BBOOL CK_FALSE
|
||||
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
|
||||
-CKA_LABEL UTF8 "Explicitly Distrusted DigiNotar PKIoverheid G2"
|
||||
-CKA_CERT_SHA1_HASH MULTILINE_OCTAL
|
||||
-\325\362\127\251\277\055\320\077\213\106\127\371\053\311\244\306
|
||||
-\222\341\102\102
|
||||
-END
|
||||
-CKA_CERT_MD5_HASH MULTILINE_OCTAL
|
||||
-\056\141\242\321\170\316\356\277\131\063\260\043\024\017\224\034
|
||||
-END
|
||||
-CKA_ISSUER MULTILINE_OCTAL
|
||||
-\060\132\061\013\060\011\006\003\125\004\006\023\002\116\114\061
|
||||
-\027\060\025\006\003\125\004\012\014\016\104\151\147\151\116\157
|
||||
-\164\141\162\040\102\056\126\056\061\062\060\060\006\003\125\004
|
||||
-\003\014\051\104\151\147\151\116\157\164\141\162\040\120\113\111
|
||||
-\157\166\145\162\150\145\151\144\040\103\101\040\117\162\147\141
|
||||
-\156\151\163\141\164\151\145\040\055\040\107\062
|
||||
-END
|
||||
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
-\002\004\017\377\377\377
|
||||
-END
|
||||
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
-
|
||||
-#
|
||||
# Certificate "Security Communication RootCA2"
|
||||
#
|
||||
# Issuer: OU=Security Communication RootCA2,O="SECOM Trust Systems CO.,LTD.",C=JP
|
||||
# Serial Number: 0 (0x0)
|
||||
# Subject: OU=Security Communication RootCA2,O="SECOM Trust Systems CO.,LTD.",C=JP
|
||||
# Not Valid Before: Fri May 29 05:00:39 2009
|
||||
# Not Valid After : Tue May 29 05:00:39 2029
|
||||
# Fingerprint (SHA-256): 51:3B:2C:EC:B8:10:D4:CD:E5:DD:85:39:1A:DF:C6:C2:DD:60:D8:7B:B7:36:D2:B5:21:48:4A:A4:7A:0E:BE:F6
|
||||
@@ -8337,78 +8156,16 @@ END
|
||||
CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
\002\001\000
|
||||
END
|
||||
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
|
||||
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
|
||||
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
|
||||
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
|
||||
-# Explicitly Distrust "MITM subCA 1 issued by Trustwave", Bug 724929
|
||||
-# Issuer: E=ca@trustwave.com,CN="Trustwave Organization Issuing CA, Level 2",O="Trustwave Holdings, Inc.",L=Chicago,ST=Illinois,C=US
|
||||
-# Serial Number: 1800000005 (0x6b49d205)
|
||||
-# Not Before: Apr 7 15:37:15 2011 GMT
|
||||
-# Not After : Apr 4 15:37:15 2021 GMT
|
||||
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
|
||||
-CKA_TOKEN CK_BBOOL CK_TRUE
|
||||
-CKA_PRIVATE CK_BBOOL CK_FALSE
|
||||
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
|
||||
-CKA_LABEL UTF8 "MITM subCA 1 issued by Trustwave"
|
||||
-CKA_ISSUER MULTILINE_OCTAL
|
||||
-\060\201\253\061\013\060\011\006\003\125\004\006\023\002\125\123
|
||||
-\061\021\060\017\006\003\125\004\010\023\010\111\154\154\151\156
|
||||
-\157\151\163\061\020\060\016\006\003\125\004\007\023\007\103\150
|
||||
-\151\143\141\147\157\061\041\060\037\006\003\125\004\012\023\030
|
||||
-\124\162\165\163\164\167\141\166\145\040\110\157\154\144\151\156
|
||||
-\147\163\054\040\111\156\143\056\061\063\060\061\006\003\125\004
|
||||
-\003\023\052\124\162\165\163\164\167\141\166\145\040\117\162\147
|
||||
-\141\156\151\172\141\164\151\157\156\040\111\163\163\165\151\156
|
||||
-\147\040\103\101\054\040\114\145\166\145\154\040\062\061\037\060
|
||||
-\035\006\011\052\206\110\206\367\015\001\011\001\026\020\143\141
|
||||
-\100\164\162\165\163\164\167\141\166\145\056\143\157\155
|
||||
-END
|
||||
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
-\002\004\153\111\322\005
|
||||
-END
|
||||
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
-
|
||||
-# Explicitly Distrust "MITM subCA 2 issued by Trustwave", Bug 724929
|
||||
-# Issuer: E=ca@trustwave.com,CN="Trustwave Organization Issuing CA, Level 2",O="Trustwave Holdings, Inc.",L=Chicago,ST=Illinois,C=US
|
||||
-# Serial Number: 1800000006 (0x6b49d206)
|
||||
-# Not Before: Apr 18 21:09:30 2011 GMT
|
||||
-# Not After : Apr 15 21:09:30 2021 GMT
|
||||
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
|
||||
-CKA_TOKEN CK_BBOOL CK_TRUE
|
||||
-CKA_PRIVATE CK_BBOOL CK_FALSE
|
||||
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
|
||||
-CKA_LABEL UTF8 "MITM subCA 2 issued by Trustwave"
|
||||
-CKA_ISSUER MULTILINE_OCTAL
|
||||
-\060\201\253\061\013\060\011\006\003\125\004\006\023\002\125\123
|
||||
-\061\021\060\017\006\003\125\004\010\023\010\111\154\154\151\156
|
||||
-\157\151\163\061\020\060\016\006\003\125\004\007\023\007\103\150
|
||||
-\151\143\141\147\157\061\041\060\037\006\003\125\004\012\023\030
|
||||
-\124\162\165\163\164\167\141\166\145\040\110\157\154\144\151\156
|
||||
-\147\163\054\040\111\156\143\056\061\063\060\061\006\003\125\004
|
||||
-\003\023\052\124\162\165\163\164\167\141\166\145\040\117\162\147
|
||||
-\141\156\151\172\141\164\151\157\156\040\111\163\163\165\151\156
|
||||
-\147\040\103\101\054\040\114\145\166\145\154\040\062\061\037\060
|
||||
-\035\006\011\052\206\110\206\367\015\001\011\001\026\020\143\141
|
||||
-\100\164\162\165\163\164\167\141\166\145\056\143\157\155
|
||||
-END
|
||||
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
-\002\004\153\111\322\006
|
||||
-END
|
||||
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
-
|
||||
#
|
||||
# Certificate "Actalis Authentication Root CA"
|
||||
#
|
||||
# Issuer: CN=Actalis Authentication Root CA,O=Actalis S.p.A./03358520967,L=Milan,C=IT
|
||||
# Serial Number:57:0a:11:97:42:c4:e3:cc
|
||||
# Subject: CN=Actalis Authentication Root CA,O=Actalis S.p.A./03358520967,L=Milan,C=IT
|
||||
# Not Valid Before: Thu Sep 22 11:22:02 2011
|
||||
# Not Valid After : Sun Sep 22 11:22:02 2030
|
||||
@@ -9042,84 +8799,16 @@ END
|
||||
CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
\002\001\001
|
||||
END
|
||||
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR
|
||||
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
|
||||
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
|
||||
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
|
||||
-# Explicitly Distrust "TURKTRUST Mis-issued Intermediate CA 1", Bug 825022
|
||||
-# Issuer: O=T..RKTRUST Bilgi ..leti..im ve Bili..im G..venli..i Hizmetleri A...,C=TR,CN=T..RKTRUST Elektronik Sunucu Sertifikas.. Hizmetleri
|
||||
-# Serial Number: 2087 (0x827)
|
||||
-# Subject: CN=*.EGO.GOV.TR,OU=EGO BILGI ISLEM,O=EGO,L=ANKARA,ST=ANKARA,C=TR
|
||||
-# Not Valid Before: Mon Aug 08 07:07:51 2011
|
||||
-# Not Valid After : Tue Jul 06 07:07:51 2021
|
||||
-# Fingerprint (MD5): F8:F5:25:FF:0C:31:CF:85:E1:0C:86:17:C1:CE:1F:8E
|
||||
-# Fingerprint (SHA1): C6:9F:28:C8:25:13:9E:65:A6:46:C4:34:AC:A5:A1:D2:00:29:5D:B1
|
||||
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
|
||||
-CKA_TOKEN CK_BBOOL CK_TRUE
|
||||
-CKA_PRIVATE CK_BBOOL CK_FALSE
|
||||
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
|
||||
-CKA_LABEL UTF8 "TURKTRUST Mis-issued Intermediate CA 1"
|
||||
-CKA_ISSUER MULTILINE_OCTAL
|
||||
-\060\201\254\061\075\060\073\006\003\125\004\003\014\064\124\303
|
||||
-\234\122\113\124\122\125\123\124\040\105\154\145\153\164\162\157
|
||||
-\156\151\153\040\123\165\156\165\143\165\040\123\145\162\164\151
|
||||
-\146\151\153\141\163\304\261\040\110\151\172\155\145\164\154\145
|
||||
-\162\151\061\013\060\011\006\003\125\004\006\023\002\124\122\061
|
||||
-\136\060\134\006\003\125\004\012\014\125\124\303\234\122\113\124
|
||||
-\122\125\123\124\040\102\151\154\147\151\040\304\260\154\145\164
|
||||
-\151\305\237\151\155\040\166\145\040\102\151\154\151\305\237\151
|
||||
-\155\040\107\303\274\166\145\156\154\151\304\237\151\040\110\151
|
||||
-\172\155\145\164\154\145\162\151\040\101\056\305\236\056\040\050
|
||||
-\143\051\040\113\141\163\304\261\155\040\040\062\060\060\065
|
||||
-END
|
||||
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
-\002\002\010\047
|
||||
-END
|
||||
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
-
|
||||
-# Explicitly Distrust "TURKTRUST Mis-issued Intermediate CA 2", Bug 825022
|
||||
-# Issuer: O=T..RKTRUST Bilgi ..leti..im ve Bili..im G..venli..i Hizmetleri A...,C=TR,CN=T..RKTRUST Elektronik Sunucu Sertifikas.. Hizmetleri
|
||||
-# Serial Number: 2148 (0x864)
|
||||
-# Subject: E=ileti@kktcmerkezbankasi.org,CN=e-islem.kktcmerkezbankasi.org,O=KKTC Merkez Bankasi,L=Lefkosa,ST=Lefkosa,C=TR
|
||||
-# Not Valid Before: Mon Aug 08 07:07:51 2011
|
||||
-# Not Valid After : Thu Aug 05 07:07:51 2021
|
||||
-# Fingerprint (MD5): BF:C3:EC:AD:0F:42:4F:B4:B5:38:DB:35:BF:AD:84:A2
|
||||
-# Fingerprint (SHA1): F9:2B:E5:26:6C:C0:5D:B2:DC:0D:C3:F2:DC:74:E0:2D:EF:D9:49:CB
|
||||
-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST
|
||||
-CKA_TOKEN CK_BBOOL CK_TRUE
|
||||
-CKA_PRIVATE CK_BBOOL CK_FALSE
|
||||
-CKA_MODIFIABLE CK_BBOOL CK_FALSE
|
||||
-CKA_LABEL UTF8 "TURKTRUST Mis-issued Intermediate CA 2"
|
||||
-CKA_ISSUER MULTILINE_OCTAL
|
||||
-\060\201\254\061\075\060\073\006\003\125\004\003\014\064\124\303
|
||||
-\234\122\113\124\122\125\123\124\040\105\154\145\153\164\162\157
|
||||
-\156\151\153\040\123\165\156\165\143\165\040\123\145\162\164\151
|
||||
-\146\151\153\141\163\304\261\040\110\151\172\155\145\164\154\145
|
||||
-\162\151\061\013\060\011\006\003\125\004\006\023\002\124\122\061
|
||||
-\136\060\134\006\003\125\004\012\014\125\124\303\234\122\113\124
|
||||
-\122\125\123\124\040\102\151\154\147\151\040\304\260\154\145\164
|
||||
-\151\305\237\151\155\040\166\145\040\102\151\154\151\305\237\151
|
||||
-\155\040\107\303\274\166\145\156\154\151\304\237\151\040\110\151
|
||||
-\172\155\145\164\154\145\162\151\040\101\056\305\236\056\040\050
|
||||
-\143\051\040\113\141\163\304\261\155\040\040\062\060\060\065
|
||||
-END
|
||||
-CKA_SERIAL_NUMBER MULTILINE_OCTAL
|
||||
-\002\002\010\144
|
||||
-END
|
||||
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED
|
||||
-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
|
||||
-
|
||||
#
|
||||
# Certificate "D-TRUST Root Class 3 CA 2 2009"
|
||||
#
|
||||
# Issuer: CN=D-TRUST Root Class 3 CA 2 2009,O=D-Trust GmbH,C=DE
|
||||
# Serial Number: 623603 (0x983f3)
|
||||
# Subject: CN=D-TRUST Root Class 3 CA 2 2009,O=D-Trust GmbH,C=DE
|
||||
# Not Valid Before: Thu Nov 05 08:35:58 2009
|
||||
# Not Valid After : Mon Nov 05 08:35:58 2029
|
170
SOURCES/nss-3.79-dont-verify-default.patch
Normal file
170
SOURCES/nss-3.79-dont-verify-default.patch
Normal file
@ -0,0 +1,170 @@
|
||||
diff --git a/lib/softoken/legacydb/pcertdb.c b/lib/softoken/legacydb/pcertdb.c
|
||||
--- a/lib/softoken/legacydb/pcertdb.c
|
||||
+++ b/lib/softoken/legacydb/pcertdb.c
|
||||
@@ -4272,16 +4272,17 @@ CreateTrust(void)
|
||||
{
|
||||
NSSLOWCERTTrust *trust = NULL;
|
||||
|
||||
nsslowcert_LockFreeList();
|
||||
trust = trustListHead;
|
||||
if (trust) {
|
||||
trustListCount--;
|
||||
trustListHead = trust->next;
|
||||
+ trust->next = NULL;
|
||||
}
|
||||
PORT_Assert(trustListCount >= 0);
|
||||
nsslowcert_UnlockFreeList();
|
||||
if (trust) {
|
||||
return trust;
|
||||
}
|
||||
|
||||
return PORT_ZNew(NSSLOWCERTTrust);
|
||||
@@ -5155,19 +5156,21 @@ done:
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsslowcert_hasTrust(NSSLOWCERTCertTrust *trust)
|
||||
{
|
||||
if (trust == NULL) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
- return !((trust->sslFlags & CERTDB_TRUSTED_UNKNOWN) &&
|
||||
- (trust->emailFlags & CERTDB_TRUSTED_UNKNOWN) &&
|
||||
- (trust->objectSigningFlags & CERTDB_TRUSTED_UNKNOWN));
|
||||
+ /* if we only have CERTDB__USER and CERTDB_TRUSTED_UNKNOWN bits, then
|
||||
+ * we don't have a trust record. */
|
||||
+ return !(((trust->sslFlags & ~(CERTDB_USER|CERTDB_TRUSTED_UNKNOWN)) == 0) &&
|
||||
+ ((trust->emailFlags & ~(CERTDB_USER|CERTDB_TRUSTED_UNKNOWN)) == 0) &&
|
||||
+ ((trust->objectSigningFlags & ~(CERTDB_USER|CERTDB_TRUSTED_UNKNOWN)) == 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* This function has the logic that decides if another person's cert and
|
||||
* email profile from an S/MIME message should be saved. It can deal with
|
||||
* the case when there is no profile.
|
||||
*/
|
||||
static SECStatus
|
||||
diff --git a/lib/softoken/sftkdb.c b/lib/softoken/sftkdb.c
|
||||
--- a/lib/softoken/sftkdb.c
|
||||
+++ b/lib/softoken/sftkdb.c
|
||||
@@ -119,47 +119,79 @@ sftkdb_isAuthenticatedAttribute(CK_ATTRI
|
||||
case CKA_TRUST_STEP_UP_APPROVED:
|
||||
case CKA_NSS_OVERRIDE_EXTENSIONS:
|
||||
return PR_TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
-
|
||||
/*
|
||||
* convert a native ULONG to a database ulong. Database ulong's
|
||||
* are all 4 byte big endian values.
|
||||
*/
|
||||
void
|
||||
sftk_ULong2SDBULong(unsigned char *data, CK_ULONG value)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SDB_ULONG_SIZE; i++) {
|
||||
data[i] = (value >> (SDB_ULONG_SIZE - 1 - i) * BBP) & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* convert a database ulong back to a native ULONG. (reverse of the above
|
||||
- * function.
|
||||
+ * function).
|
||||
*/
|
||||
static CK_ULONG
|
||||
sftk_SDBULong2ULong(unsigned char *data)
|
||||
{
|
||||
int i;
|
||||
CK_ULONG value = 0;
|
||||
|
||||
for (i = 0; i < SDB_ULONG_SIZE; i++) {
|
||||
value |= (((CK_ULONG)data[i]) << (SDB_ULONG_SIZE - 1 - i) * BBP);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
+/* certain trust records are default values, which are the values
|
||||
+ * returned if the signature check fails anyway.
|
||||
+ * In those cases, we can skip the signature check. */
|
||||
+PRBool
|
||||
+sftkdb_isNullTrust(const CK_ATTRIBUTE *template)
|
||||
+{
|
||||
+ switch (template->type) {
|
||||
+ case CKA_TRUST_SERVER_AUTH:
|
||||
+ case CKA_TRUST_CLIENT_AUTH:
|
||||
+ case CKA_TRUST_EMAIL_PROTECTION:
|
||||
+ case CKA_TRUST_CODE_SIGNING:
|
||||
+ if (template->ulValueLen != SDB_ULONG_SIZE) {
|
||||
+ break;
|
||||
+ }
|
||||
+ if (sftk_SDBULong2ULong(template->pValue) ==
|
||||
+ CKT_NSS_TRUST_UNKNOWN) {
|
||||
+ return PR_TRUE;
|
||||
+ }
|
||||
+ break;
|
||||
+ case CKA_TRUST_STEP_UP_APPROVED:
|
||||
+ if (template->ulValueLen != 1) {
|
||||
+ break;
|
||||
+ }
|
||||
+ if (*((unsigned char *)(template->pValue)) == 0) {
|
||||
+ return PR_TRUE;
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ return PR_FALSE;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* fix up the input templates. Our fixed up ints are stored in data and must
|
||||
* be freed by the caller. The new template must also be freed. If there are no
|
||||
* CK_ULONG attributes, the orignal template is passed in as is.
|
||||
*/
|
||||
static CK_ATTRIBUTE *
|
||||
sftkdb_fixupTemplateIn(const CK_ATTRIBUTE *template, int count,
|
||||
unsigned char **dataOut, int *dataOutSize)
|
||||
@@ -410,17 +442,18 @@ sftkdb_fixupTemplateOut(CK_ATTRIBUTE *te
|
||||
}
|
||||
|
||||
/* copy the plain text back into the template */
|
||||
PORT_Memcpy(template[i].pValue, plainText->data, plainText->len);
|
||||
template[i].ulValueLen = plainText->len;
|
||||
SECITEM_ZfreeItem(plainText, PR_TRUE);
|
||||
}
|
||||
/* make sure signed attributes are valid */
|
||||
- if (checkSig && sftkdb_isAuthenticatedAttribute(ntemplate[i].type)) {
|
||||
+ if (checkSig && sftkdb_isAuthenticatedAttribute(ntemplate[i].type)
|
||||
+ && !sftkdb_isNullTrust(&ntemplate[i])) {
|
||||
SECStatus rv;
|
||||
CK_RV local_crv;
|
||||
SECItem signText;
|
||||
SECItem plainText;
|
||||
unsigned char signData[SDB_MAX_META_DATA_LEN];
|
||||
|
||||
signText.data = signData;
|
||||
signText.len = sizeof(signData);
|
||||
@@ -2387,16 +2420,18 @@ sftkdb_mergeObject(SFTKDBHandle *handle,
|
||||
crv = (*source->sdb_GetAttributeValue)(source, id,
|
||||
ptemplate, max_attributes);
|
||||
if (crv != CKR_OK) {
|
||||
goto loser;
|
||||
}
|
||||
|
||||
objectType = sftkdb_getULongFromTemplate(CKA_CLASS, ptemplate,
|
||||
max_attributes);
|
||||
+printf(" - merging object Type 0x%08lx id=0x%08lx updateID=%s\n", objectType, id,
|
||||
+ handle->updateID?handle->updateID: "<NULL>");
|
||||
|
||||
/*
|
||||
* Update Object updates the object template if necessary then returns
|
||||
* whether or not we need to actually write the object out to our target
|
||||
* database.
|
||||
*/
|
||||
if (!handle->updateID) {
|
||||
crv = sftkdb_CreateObject(arena, handle, target, &newID,
|
23
SOURCES/nss-3.79-fix-client-cert-crash.patch
Normal file
23
SOURCES/nss-3.79-fix-client-cert-crash.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/lib/ssl/authcert.c b/lib/ssl/authcert.c
|
||||
--- a/lib/ssl/authcert.c
|
||||
+++ b/lib/ssl/authcert.c
|
||||
@@ -212,17 +212,17 @@ NSS_GetClientAuthData(void *arg,
|
||||
pw_arg);
|
||||
} else {
|
||||
int nnames = 0;
|
||||
char **names = ssl_DistNamesToStrings(caNames, &nnames);
|
||||
rv = CERT_FilterCertListByCANames(certList, nnames, names,
|
||||
certUsageSSLClient);
|
||||
ssl_FreeDistNamesStrings(names, nnames);
|
||||
}
|
||||
- if ((rv != SECSuccess) || CERT_LIST_EMPTY(certList)) {
|
||||
+ if ((rv != SECSuccess) || (certList && CERT_LIST_EMPTY(certList))) {
|
||||
CERT_DestroyCertList(certList);
|
||||
certList = NULL;
|
||||
}
|
||||
}
|
||||
if (certList == NULL) {
|
||||
/* no user certs meeting the nickname/usage requirements found */
|
||||
return SECFailure;
|
||||
}
|
||||
|
@ -1,62 +0,0 @@
|
||||
--- nss/cmd/httpserv/httpserv.c.539183 2016-05-21 18:31:39.879585420 -0700
|
||||
+++ nss/cmd/httpserv/httpserv.c 2016-05-21 18:37:22.374464057 -0700
|
||||
@@ -953,23 +953,23 @@
|
||||
getBoundListenSocket(unsigned short port)
|
||||
{
|
||||
PRFileDesc *listen_sock;
|
||||
int listenQueueDepth = 5 + (2 * maxThreads);
|
||||
PRStatus prStatus;
|
||||
PRNetAddr addr;
|
||||
PRSocketOptionData opt;
|
||||
|
||||
- addr.inet.family = PR_AF_INET;
|
||||
- addr.inet.ip = PR_INADDR_ANY;
|
||||
- addr.inet.port = PR_htons(port);
|
||||
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
|
||||
+ errExit("PR_SetNetAddr");
|
||||
+ }
|
||||
|
||||
- listen_sock = PR_NewTCPSocket();
|
||||
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
|
||||
if (listen_sock == NULL) {
|
||||
- errExit("PR_NewTCPSocket");
|
||||
+ errExit("PR_OpenTCPSockett");
|
||||
}
|
||||
|
||||
opt.option = PR_SockOpt_Nonblocking;
|
||||
opt.value.non_blocking = PR_FALSE;
|
||||
prStatus = PR_SetSocketOption(listen_sock, &opt);
|
||||
if (prStatus < 0) {
|
||||
PR_Close(listen_sock);
|
||||
errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)");
|
||||
--- nss/cmd/selfserv/selfserv.c.539183 2016-05-21 18:31:39.882585367 -0700
|
||||
+++ nss/cmd/selfserv/selfserv.c 2016-05-21 18:41:43.092801174 -0700
|
||||
@@ -1711,23 +1711,23 @@
|
||||
getBoundListenSocket(unsigned short port)
|
||||
{
|
||||
PRFileDesc *listen_sock;
|
||||
int listenQueueDepth = 5 + (2 * maxThreads);
|
||||
PRStatus prStatus;
|
||||
PRNetAddr addr;
|
||||
PRSocketOptionData opt;
|
||||
|
||||
- addr.inet.family = PR_AF_INET;
|
||||
- addr.inet.ip = PR_INADDR_ANY;
|
||||
- addr.inet.port = PR_htons(port);
|
||||
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
|
||||
+ errExit("PR_SetNetAddr");
|
||||
+ }
|
||||
|
||||
- listen_sock = PR_NewTCPSocket();
|
||||
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
|
||||
if (listen_sock == NULL) {
|
||||
- errExit("PR_NewTCPSocket");
|
||||
+ errExit("PR_OpenTCPSocket error");
|
||||
}
|
||||
|
||||
opt.option = PR_SockOpt_Nonblocking;
|
||||
opt.value.non_blocking = PR_FALSE;
|
||||
prStatus = PR_SetSocketOption(listen_sock, &opt);
|
||||
if (prStatus < 0) {
|
||||
PR_Close(listen_sock);
|
||||
errExit("PR_SetSocketOption(PR_SockOpt_Nonblocking)");
|
@ -1,6 +1,7 @@
|
||||
%global nspr_build_version 4.25.0
|
||||
%global nspr_version 4.25.0
|
||||
%global nss_version 3.67.0
|
||||
%global nspr_build_version 4.34.0-3
|
||||
%global nspr_release -3
|
||||
%global nspr_version 4.34.0
|
||||
%global nss_version 3.79.0
|
||||
%global unsupported_tools_directory %{_libdir}/nss/unsupported-tools
|
||||
%global saved_files_dir %{_libdir}/nss/saved
|
||||
%global dracutlibdir %{_prefix}/lib/dracut
|
||||
@ -44,13 +45,28 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM",
|
||||
string.gsub(rpm.expand("%nss_archive_version"), "%.", "_")))
|
||||
}
|
||||
|
||||
# This is taken from gnutls.spec
|
||||
%define srpmhash() %{lua:
|
||||
local files = rpm.expand("%_specdir/nss.spec")
|
||||
for i, p in ipairs(patches) do
|
||||
files = files.." "..p
|
||||
end
|
||||
for i, p in ipairs(sources) do
|
||||
files = files.." "..p
|
||||
end
|
||||
local sha256sum = assert(io.popen("cat "..files.."| sha256sum"))
|
||||
local hash = sha256sum:read("*a")
|
||||
sha256sum:close()
|
||||
print(string.sub(hash, 0, 16))
|
||||
}
|
||||
|
||||
Summary: Network Security Services
|
||||
Name: nss
|
||||
Version: %{nss_version}
|
||||
Release: 7%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: MPLv2.0
|
||||
URL: http://www.mozilla.org/projects/security/pki/nss/
|
||||
Requires: nspr >= %{nspr_version}
|
||||
Requires: nspr >= %{nspr_version}%{nspr_release}
|
||||
Requires: nss-util >= %{nss_version}
|
||||
# TODO: revert to same version as nss once we are done with the merge
|
||||
Requires: nss-softokn%{_isa} >= %{nss_version}
|
||||
@ -93,12 +109,10 @@ Source25: key3.db.xml
|
||||
Source26: key4.db.xml
|
||||
Source27: secmod.db.xml
|
||||
Source28: nss-p11-kit.config
|
||||
Source30: PayPalEE.cert
|
||||
#Source30: PayPalEE.cert
|
||||
|
||||
# To inject hardening flags for DSO
|
||||
Patch1: nss-dso-ldflags.patch
|
||||
# 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,
|
||||
@ -139,27 +153,13 @@ Patch45: nss-3.66-disable-external-host-test.patch
|
||||
# Local patch: restore old pkcs 12 defaults on old version of rhel
|
||||
Patch50: nss-3.66-restore-old-pkcs12-default.patch
|
||||
|
||||
# Patches that should be upstreamed, and (hopefully) will disappear next
|
||||
# rebase
|
||||
# Need upstream bug
|
||||
Patch219: nss-3.44-kbkdf-coverity.patch
|
||||
# no upsteam bug yet
|
||||
Patch225: nss-3.67-fix-private-key-mac.patch
|
||||
# no upstream bug yet
|
||||
Patch229: nss-3.53.1-measure-fix.patch
|
||||
# no upstream bug yet
|
||||
Patch230: nss-3.66-no-small-primes.patch
|
||||
# no upstream bug yet
|
||||
Patch232: nss-3.66-fix-gtest-parsing.patch
|
||||
# no upstream bug yet
|
||||
Patch233: nss-3.67-fix-coverity-issues.patch
|
||||
# no upstream bug yet
|
||||
Patch234: nss-3.67-fix-sdb-timeout.patch
|
||||
# no upstream bug yet
|
||||
Patch235: nss-3.67-fix-ssl-alerts.patch
|
||||
Patch300: nss-3.67-cve-2021-43527.patch
|
||||
Patch301: nss-3.67-cve-2021-43527-test.patch
|
||||
# post upstream release patches (need to be upstreamed)
|
||||
Patch60: nss-3.79-dbtool.patch
|
||||
Patch61: nss-3.79-dont-verify-default.patch
|
||||
Patch63: nss-3.79-fix-client-cert-crash.patch
|
||||
|
||||
# restore expired distrusted certs for now
|
||||
Patch300: nss-3.79-distrusted-certs.patch
|
||||
|
||||
|
||||
%description
|
||||
@ -203,7 +203,7 @@ Provides: nss-static = %{version}-%{release}
|
||||
Requires: nss%{?_isa} = %{version}-%{release}
|
||||
Requires: nss-util-devel
|
||||
Requires: nss-softokn-devel
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
Requires: nspr-devel >= %{nspr_version}%{nspr_release}
|
||||
Requires: pkgconfig
|
||||
BuildRequires: xmlto
|
||||
|
||||
@ -224,7 +224,7 @@ low level services.
|
||||
|
||||
%package util
|
||||
Summary: Network Security Services Utilities Library
|
||||
Requires: nspr >= %{nspr_version}
|
||||
Requires: nspr >= %{nspr_version}%{nspr_release}
|
||||
|
||||
%description util
|
||||
Utilities for Network Security Services and the Softoken module
|
||||
@ -232,7 +232,7 @@ Utilities for Network Security Services and the Softoken module
|
||||
%package util-devel
|
||||
Summary: Development libraries for Network Security Services Utilities
|
||||
Requires: nss-util%{?_isa} = %{version}-%{release}
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
Requires: nspr-devel >= %{nspr_version}%{nspr_release}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description util-devel
|
||||
@ -241,7 +241,7 @@ Header and library files for doing development with Network Security Services.
|
||||
|
||||
%package softokn
|
||||
Summary: Network Security Services Softoken Module
|
||||
Requires: nspr >= %{nspr_version}
|
||||
Requires: nspr >= %{nspr_version}%{nspr_release}
|
||||
Requires: nss-util >= %{version}-%{release}
|
||||
Requires: nss-softokn-freebl%{_isa} >= %{version}-%{release}
|
||||
|
||||
@ -278,7 +278,7 @@ Developers should rely only on the officially supported NSS public API.
|
||||
Summary: Development libraries for Network Security Services
|
||||
Requires: nss-softokn%{?_isa} = %{version}-%{release}
|
||||
Requires: nss-softokn-freebl-devel%{?_isa} = %{version}-%{release}
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
Requires: nspr-devel >= %{nspr_version}%{nspr_release}
|
||||
Requires: nss-util-devel >= %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
BuildRequires: nspr-devel >= %{nspr_build_version}
|
||||
@ -290,14 +290,15 @@ Header and library files for doing development with Network Security Services.
|
||||
%prep
|
||||
%autosetup -N -n %{name}-%{nss_archive_version}
|
||||
pushd nss
|
||||
%autopatch -p1
|
||||
%autopatch -p1 -M 299
|
||||
%patch300 -R -p1
|
||||
popd
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1247353
|
||||
find nss/lib/libpkix -perm /u+x -type f -exec chmod -x {} \;
|
||||
|
||||
#update paypal cert (git binary patches don't work with autopatch)
|
||||
cp %{SOURCE30} nss/tests/libpkix/certs/
|
||||
#cp %{SOURCE30} nss/tests/libpkix/certs/
|
||||
|
||||
%build
|
||||
|
||||
@ -312,7 +313,13 @@ export FREEBL_LOWHASH=1
|
||||
# uncomment if the iquote patch is activated
|
||||
export IN_TREE_FREEBL_HEADERS_FIRST=1
|
||||
|
||||
# FIPS related defines
|
||||
export NSS_FORCE_FIPS=1
|
||||
export NSS_FIPS_VERSION="%{name}\ %{version}-%{srpmhash}"
|
||||
eval $(sed -n 's/^\(\(NAME\|VERSION_ID\)=.*\)/OS_\1/p' /etc/os-release | sed -e 's/ /\\ /g')
|
||||
export FIPS_MODULE_OS="$OS_NAME\ ${OS_VERSION_ID%%.*}"
|
||||
export NSS_FIPS_MODULE_ID="${FIPS_MODULE_OS}\ ${NSS_FIPS_VERSION}"
|
||||
|
||||
|
||||
# Enable compiler optimizations and disable debugging code
|
||||
export BUILD_OPT=1
|
||||
@ -603,7 +610,7 @@ do
|
||||
done
|
||||
|
||||
# Copy the binaries we ship as unsupported
|
||||
for file in bltest ecperf fbectest fipstest shlibsign atob btoa derdump listsuites ocspclnt pp selfserv signtool strsclnt symkeyutil tstclnt vfyserv vfychain
|
||||
for file in bltest dbtool ecperf fbectest fipstest shlibsign atob btoa derdump listsuites ocspclnt pp selfserv signtool strsclnt symkeyutil tstclnt validation vfyserv vfychain
|
||||
do
|
||||
install -p -m 755 dist/*.OBJ/bin/$file $RPM_BUILD_ROOT/%{unsupported_tools_directory}
|
||||
done
|
||||
@ -728,6 +735,7 @@ update-crypto-policies --no-reload &> /dev/null || :
|
||||
%{unsupported_tools_directory}/strsclnt
|
||||
%{unsupported_tools_directory}/symkeyutil
|
||||
%{unsupported_tools_directory}/tstclnt
|
||||
%{unsupported_tools_directory}/validation
|
||||
%{unsupported_tools_directory}/vfyserv
|
||||
%{unsupported_tools_directory}/vfychain
|
||||
# instead of %%{_mandir}/man*/* let's list them explicitly
|
||||
@ -885,6 +893,7 @@ update-crypto-policies --no-reload &> /dev/null || :
|
||||
%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
|
||||
@ -932,6 +941,22 @@ update-crypto-policies --no-reload &> /dev/null || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 17 2022 Bob Relyea <rrelyea@redhat.com> - 3.79.0-4
|
||||
- Fix pkgconfig output
|
||||
|
||||
* Wed Jun 15 2022 Bob Relyea <rrelyea@redhat.com> - 3.79.0-3
|
||||
- NSR Coverity fix changed selfserv from passive to active, change it back
|
||||
|
||||
* Sat Jun 11 2022 Bob Relyea <rrelyea@redhat.com> - 3.79.0-2
|
||||
- Fix regressions found in test suites.
|
||||
|
||||
* Thu Jun 2 2022 Bob Relyea <rrelyea@redhat.com> - 3.79.0-1
|
||||
- Rebase to NSS 3.79
|
||||
- Set FIPS Module ID
|
||||
- skip attribute verification on attributes with default values
|
||||
- don't export trust objects if they are default trust objects from dbm
|
||||
- add dbtool to nss-tools
|
||||
|
||||
* Thu Nov 18 2021 Bob Relyea <rrelyea@redhat.com> - 3.67.0-7
|
||||
- Fix CVE 2021 43527
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user