Compare commits

...
Sign in to create a new pull request.

41 commits

Author SHA1 Message Date
Daiki Ueno
09825936b8 Revert the last change, tolerate the first CCS in TLS 1.3 2020-10-26 07:02:50 +01:00
Daiki Ueno
16c2f6d758 Enable TLS 1.3 middlebox compatibility mode by default 2020-10-22 17:18:37 +02:00
Daiki Ueno
4f8c752d09 Install pk11hpke.h 2020-10-20 11:17:00 +02:00
Daiki Ueno
d971b86a10 Update to NSS 3.58 2020-10-20 09:56:15 +02:00
Daiki Ueno
2ac250b322 Update to NSS 3.57 2020-09-20 16:04:36 +02:00
Daiki Ueno
cfc2237de1 Update the AArch64 patch 2020-09-05 11:10:21 +02:00
Daiki Ueno
946602ffb6 Fix AArch64 build failure 2020-09-05 11:10:12 +02:00
Daiki Ueno
f5d96e69ce Update to NSS 3.56 2020-08-24 08:59:47 +02:00
Daiki Ueno
fbf8153cba Re-add STAGE2-nss 2020-08-02 07:46:08 +02:00
Daiki Ueno
cbfb0c529b Update to NSS 3.55 2020-08-02 07:44:53 +02:00
Daiki Ueno
8751f8e5bf Update to NSS 3.54 2020-07-15 11:35:30 +02:00
Bob Relyea
21d259321d Resolves: rhbz#1843417
Cannot compile code with pk11pub.h (an nss header) with -Werror=strict-prototypes
2020-06-05 13:41:56 -07:00
Daiki Ueno
a01c081591 Update build procedure after removal of mkdepend 2020-06-02 08:58:21 +02:00
Daiki Ueno
33682433d0 Update to NSS 3.53 2020-06-02 08:58:14 +02:00
Bob Relyea
3511128cfd Delay new CK_GCM_PARAMS semantics until fedora 34 unless explicitly enabled. 2020-05-13 16:00:12 -07:00
Daiki Ueno
2354903488 Update to NSS 3.52 2020-05-12 08:17:48 +02:00
Daiki Ueno
3dda51fb0f Update to NSS 3.51.1 2020-05-04 07:55:12 +02:00
Daiki Ueno
364a86cc8f Update to NSS 3.51 2020-04-07 11:20:36 +02:00
Daiki Ueno
4a5cdbbdb2 Apply CMAC fixes from upstream 2020-03-12 10:24:30 +01:00
Daiki Ueno
f1e37f35f8 Upload new sources 2020-03-04 17:35:50 +01:00
Daiki Ueno
c0b78bc53d Update to NSS 3.50 2020-03-04 17:34:17 +01:00
Daiki Ueno
c3571bbb3d Update to NSS 3.49.2 2020-01-27 10:32:57 +01:00
Daiki Ueno
b8de59e750 Remove leftover debug command in %build 2020-01-11 09:03:41 +01:00
Daiki Ueno
7e331e9268 Fix build on armv7hl with the patch proposed in upstream 2020-01-10 17:28:09 +01:00
Daiki Ueno
219dd2513d Fix %changelog mistakenly pulled from F32 2020-01-10 10:39:48 +01:00
Daiki Ueno
3b655a2e4d Update to NSS 3.49 2020-01-10 10:37:16 +01:00
Daiki Ueno
81985bfb96 Update to NSS 3.48 2020-01-03 11:17:25 +01:00
Daiki Ueno
71cc95f92d Update nss-3.47-certdb-temp-cert.patch 2019-12-04 10:21:09 +01:00
Daiki Ueno
1c0d77a6bb Update nss-3.47-certdb-temp-cert.patch to avoid setting empty trust value 2019-12-03 15:52:20 +01:00
Daiki Ueno
7007c4d430 Update nss-3.47-certdb-temp-cert.patch to the final version 2019-12-03 09:33:04 +01:00
Daiki Ueno
eab1ac8862 Fix intermittent SEC_ERROR_UNKNOWN_ISSUER (#1752303, #1648617) 2019-11-28 16:14:26 +01:00
Daiki Ueno
ed198c7587 Update to NSS 3.47.1 2019-11-22 18:02:43 +01:00
Bob Relyea
0102258016 Resolves: rhbz#1768653
NSS softoken does not include CKM_NSS_IKE1_APP_B_PRF_DERIVE in it's mechanism list, causing libreswan to crash.
2019-11-04 14:08:21 -08:00
Daiki Ueno
74e1e8c297 Install cmac.h required by blapi.h (#1764513) 2019-10-23 13:08:14 +02:00
Daiki Ueno
b7b17c0e1f Update to NSS 3.47 2019-10-22 15:24:15 +02:00
Daiki Ueno
3c59bd0f5a Update to NSS 3.46.1 2019-10-21 13:48:37 +02:00
Daiki Ueno
f767d63b1b Rebuild with NSPR 4.22 2019-09-04 11:52:26 +02:00
Daiki Ueno
79de609de6 Remove unused patch 2019-09-03 11:08:58 +02:00
Daiki Ueno
cf10cdf089 Remove upstreamed patch 2019-09-03 11:06:21 +02:00
Daiki Ueno
64e05e396d Restore files mistakenly removed in the last commit 2019-09-03 09:51:35 +02:00
Daiki Ueno
4d56a6c3a1 Update to NSS 3.46 2019-09-03 09:47:21 +02:00
9 changed files with 367 additions and 231 deletions

17
.gitignore vendored
View file

@ -37,3 +37,20 @@ TestUser51.cert
/nss-3.43.tar.gz
/nss-3.44.tar.gz
/nss-3.44.1.tar.gz
/nss-3.46.tar.gz
/nss-3.46.1.tar.gz
/nss-3.47.tar.gz
/nss-3.47.1.tar.gz
/nss-3.48.tar.gz
/nss-3.49.tar.gz
/nss-3.49.2.tar.gz
/nss-3.50.tar.gz
/nss-3.51.tar.gz
/nss-3.51.1.tar.gz
/nss-3.52.tar.gz
/nss-3.53.tar.gz
/nss-3.54.tar.gz
/nss-3.55.tar.gz
/nss-3.56.tar.gz
/nss-3.57.tar.gz
/nss-3.58.tar.gz

View file

@ -1,155 +0,0 @@
# HG changeset patch
# User Daiki Ueno <dueno@redhat.com>
# Date 1562162181 -7200
# Wed Jul 03 15:56:21 2019 +0200
# Node ID 88feab2a3e5e4b00b1626d59a0d3ecef93cafb92
# Parent b5d3f574967f8c5c705dab15682b0e16fac3e4be
tests: ensure CAVS test dirs are created
diff --git a/tests/fips/cavs_scripts/aes.sh b/tests/fips/cavs_scripts/aes.sh
--- a/tests/fips/cavs_scripts/aes.sh
+++ b/tests/fips/cavs_scripts/aes.sh
@@ -83,6 +83,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
for request in $cbc_kat_requests; do
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/aesgcm.sh b/tests/fips/cavs_scripts/aesgcm.sh
--- a/tests/fips/cavs_scripts/aesgcm.sh
+++ b/tests/fips/cavs_scripts/aesgcm.sh
@@ -56,6 +56,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
for request in $gcm_decrypt_requests; do
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/dsa.sh b/tests/fips/cavs_scripts/dsa.sh
--- a/tests/fips/cavs_scripts/dsa.sh
+++ b/tests/fips/cavs_scripts/dsa.sh
@@ -59,6 +59,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
request=KeyPair.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/ecdsa.sh b/tests/fips/cavs_scripts/ecdsa.sh
--- a/tests/fips/cavs_scripts/ecdsa.sh
+++ b/tests/fips/cavs_scripts/ecdsa.sh
@@ -50,6 +50,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
request=KeyPair.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/hmac.sh b/tests/fips/cavs_scripts/hmac.sh
--- a/tests/fips/cavs_scripts/hmac.sh
+++ b/tests/fips/cavs_scripts/hmac.sh
@@ -31,6 +31,9 @@ if [ ${COMMAND} = "verify" ]; then
done
exit $result
fi
+
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
for request in $hmac_requests; do
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/ike.sh b/tests/fips/cavs_scripts/ike.sh
--- a/tests/fips/cavs_scripts/ike.sh
+++ b/tests/fips/cavs_scripts/ike.sh
@@ -33,6 +33,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
request=ikev1_dsa.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/kas.sh b/tests/fips/cavs_scripts/kas.sh
--- a/tests/fips/cavs_scripts/kas.sh
+++ b/tests/fips/cavs_scripts/kas.sh
@@ -68,6 +68,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
request=KASFunctionTest_ECCEphemeralUnified_NOKC_ZZOnly_init.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/rng.sh b/tests/fips/cavs_scripts/rng.sh
--- a/tests/fips/cavs_scripts/rng.sh
+++ b/tests/fips/cavs_scripts/rng.sh
@@ -30,6 +30,9 @@ if [ ${COMMAND} = "verify" ]; then
done
exit $result
fi
+
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
for request in $drbg_requests; do
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/rsa.sh b/tests/fips/cavs_scripts/rsa.sh
--- a/tests/fips/cavs_scripts/rsa.sh
+++ b/tests/fips/cavs_scripts/rsa.sh
@@ -38,6 +38,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
request=SigGen15_186-3.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/sha.sh b/tests/fips/cavs_scripts/sha.sh
--- a/tests/fips/cavs_scripts/sha.sh
+++ b/tests/fips/cavs_scripts/sha.sh
@@ -51,6 +51,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
for request in $sha_ShortMsg_requests; do
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/tdea.sh b/tests/fips/cavs_scripts/tdea.sh
--- a/tests/fips/cavs_scripts/tdea.sh
+++ b/tests/fips/cavs_scripts/tdea.sh
@@ -77,6 +77,8 @@ if [ ${COMMAND} = "verify" ]; then
exit $result
fi
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
for request in $cbc_kat_requests; do
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
diff --git a/tests/fips/cavs_scripts/tls.sh b/tests/fips/cavs_scripts/tls.sh
--- a/tests/fips/cavs_scripts/tls.sh
+++ b/tests/fips/cavs_scripts/tls.sh
@@ -30,6 +30,9 @@ if [ ${COMMAND} = "verify" ]; then
done
exit $result
fi
+
+test -d "${RSPDIR}" || mkdir "${RSPDIR}"
+
for request in $tls_requests; do
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response

132
nss-ccs.patch Normal file
View file

@ -0,0 +1,132 @@
# HG changeset patch
# User Daiki Ueno <dueno@redhat.com>
# Date 1603691171 -3600
# Mon Oct 26 06:46:11 2020 +0100
# Node ID b03a4fc5b902498414b02640dcb2717dfef9682f
# Parent 6f79a76958129dc09c353c288f115fd9a51ab7d4
Bug 1672703, always tolerate the first CCS in TLS 1.3, r=mt
Summary:
This flips the meaning of the flag for checking excessive CCS
messages, so it only rejects multiple CCS messages while the first CCS
message is always accepted.
Reviewers: mt
Reviewed By: mt
Bug #: 1672703
Differential Revision: https://phabricator.services.mozilla.com/D94603
diff -r 6f79a7695812 -r b03a4fc5b902 gtests/ssl_gtest/ssl_tls13compat_unittest.cc
--- a/gtests/ssl_gtest/ssl_tls13compat_unittest.cc Fri Oct 23 16:14:36 2020 -0700
+++ b/gtests/ssl_gtest/ssl_tls13compat_unittest.cc Mon Oct 26 06:46:11 2020 +0100
@@ -348,8 +348,8 @@
client_->CheckErrorCode(SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT);
}
-// The server rejects a ChangeCipherSpec if the client advertises an
-// empty session ID.
+// The server accepts a ChangeCipherSpec even if the client advertises
+// an empty session ID.
TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterClientHelloEmptySid) {
EnsureTlsSetup();
ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3);
@@ -358,9 +358,8 @@
client_->Handshake(); // Send ClientHello
client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); // Send CCS
- server_->ExpectSendAlert(kTlsAlertUnexpectedMessage);
- server_->Handshake(); // Consume ClientHello and CCS
- server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
+ Handshake();
+ CheckConnected();
}
// The server rejects multiple ChangeCipherSpec even if the client
@@ -381,7 +380,7 @@
server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
}
-// The client rejects a ChangeCipherSpec if it advertises an empty
+// The client accepts a ChangeCipherSpec even if it advertises an empty
// session ID.
TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterServerHelloEmptySid) {
EnsureTlsSetup();
@@ -398,9 +397,10 @@
// send ServerHello..CertificateVerify
// Send CCS
server_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs)));
- client_->ExpectSendAlert(kTlsAlertUnexpectedMessage);
- client_->Handshake(); // Consume ClientHello and CCS
- client_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
+
+ // No alert is sent from the client. As Finished is dropped, we
+ // can't use Handshake() and CheckConnected().
+ client_->Handshake();
}
// The client rejects multiple ChangeCipherSpec in a row even if the
diff -r 6f79a7695812 -r b03a4fc5b902 lib/ssl/ssl3con.c
--- a/lib/ssl/ssl3con.c Fri Oct 23 16:14:36 2020 -0700
+++ b/lib/ssl/ssl3con.c Mon Oct 26 06:46:11 2020 +0100
@@ -6645,11 +6645,7 @@
/* TLS 1.3: We sent a session ID. The server's should match. */
if (!IS_DTLS(ss) && (sentRealSid || sentFakeSid)) {
- if (sidMatch) {
- ss->ssl3.hs.allowCcs = PR_TRUE;
- return PR_TRUE;
- }
- return PR_FALSE;
+ return sidMatch;
}
/* TLS 1.3 (no SID)/DTLS 1.3: The server shouldn't send a session ID. */
@@ -8696,7 +8692,6 @@
errCode = PORT_GetError();
goto alert_loser;
}
- ss->ssl3.hs.allowCcs = PR_TRUE;
}
/* TLS 1.3 requires that compression include only null. */
@@ -13066,15 +13061,14 @@
ss->ssl3.hs.ws != idle_handshake &&
cText->buf->len == 1 &&
cText->buf->buf[0] == change_cipher_spec_choice) {
- if (ss->ssl3.hs.allowCcs) {
- /* Ignore the first CCS. */
- ss->ssl3.hs.allowCcs = PR_FALSE;
+ if (!ss->ssl3.hs.rejectCcs) {
+ /* Allow only the first CCS. */
+ ss->ssl3.hs.rejectCcs = PR_TRUE;
return SECSuccess;
- }
-
- /* Compatibility mode is not negotiated. */
- alert = unexpected_message;
- PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
+ } else {
+ alert = unexpected_message;
+ PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
+ }
}
if ((IS_DTLS(ss) && !dtls13_AeadLimitReached(spec)) ||
diff -r 6f79a7695812 -r b03a4fc5b902 lib/ssl/sslimpl.h
--- a/lib/ssl/sslimpl.h Fri Oct 23 16:14:36 2020 -0700
+++ b/lib/ssl/sslimpl.h Mon Oct 26 06:46:11 2020 +0100
@@ -710,10 +710,7 @@
* or received. */
PRBool receivedCcs; /* A server received ChangeCipherSpec
* before the handshake started. */
- PRBool allowCcs; /* A server allows ChangeCipherSpec
- * as the middlebox compatibility mode
- * is explicitly indicarted by
- * legacy_session_id in TLS 1.3 ClientHello. */
+ PRBool rejectCcs; /* Excessive ChangeCipherSpecs are rejected. */
PRBool clientCertRequested; /* True if CertificateRequest received. */
PRBool endOfFlight; /* Processed a full flight (DTLS 1.3). */
ssl3KEADef kea_def_mutable; /* Used to hold the writable kea_def

View 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

View file

@ -1,35 +0,0 @@
# HG changeset patch
# User Daiki Ueno <dueno@redhat.com>
# Date 1557150127 -7200
# Mon May 06 15:42:07 2019 +0200
# Node ID 438ac983bda9ec7944990d22a37877e9111caa90
# Parent b018f3e84d87cce99a1fd81feeecb31123058687
pk11slot: reference module from slot for finalization
diff --git a/lib/pk11wrap/pk11slot.c b/lib/pk11wrap/pk11slot.c
--- a/lib/pk11wrap/pk11slot.c
+++ b/lib/pk11wrap/pk11slot.c
@@ -1439,6 +1439,11 @@ PK11_InitSlot(SECMODModule *mod, CK_SLOT
slot->slotID = slotID;
slot->isThreadSafe = mod->isThreadSafe;
slot->hasRSAInfo = PR_FALSE;
+ slot->module = mod; /* NOTE: we don't make a reference here because
+ * modules have references to their slots. This
+ * works because modules keep implicit references
+ * from their slots, and won't unload and disappear
+ * until all their slots have been freed */
if (PK11_GETTAB(slot)->C_GetSlotInfo(slotID, &slotInfo) != CKR_OK) {
slot->disabled = PR_TRUE;
@@ -1448,11 +1453,6 @@ PK11_InitSlot(SECMODModule *mod, CK_SLOT
/* test to make sure claimed mechanism work */
slot->needTest = mod->internal ? PR_FALSE : PR_TRUE;
- slot->module = mod; /* NOTE: we don't make a reference here because
- * modules have references to their slots. This
- * works because modules keep implicit references
- * from their slots, and won't unload and disappear
- * until all their slots have been freed */
(void)PK11_MakeString(NULL, slot->slot_name,
(char *)slotInfo.slotDescription, sizeof(slotInfo.slotDescription));
slot->isHW = (PRBool)((slotInfo.flags & CKF_HW_SLOT) == CKF_HW_SLOT);

94
nss-signtool-format.patch Normal file
View file

@ -0,0 +1,94 @@
diff --git a/cmd/modutil/install.c b/cmd/modutil/install.c
--- a/cmd/modutil/install.c
+++ b/cmd/modutil/install.c
@@ -825,17 +825,20 @@ rm_dash_r(char *path)
dir = PR_OpenDir(path);
if (!dir) {
return -1;
}
/* Recursively delete all entries in the directory */
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
- sprintf(filename, "%s/%s", path, entry->name);
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) {
+ PR_CloseDir(dir);
+ return -1;
+ }
if (rm_dash_r(filename)) {
PR_CloseDir(dir);
return -1;
}
}
if (PR_CloseDir(dir) != PR_SUCCESS) {
return -1;
diff --git a/cmd/signtool/util.c b/cmd/signtool/util.c
--- a/cmd/signtool/util.c
+++ b/cmd/signtool/util.c
@@ -132,17 +132,20 @@ rm_dash_r(char *path)
if (!dir) {
PR_fprintf(errorFD, "Error: Unable to open directory %s.\n", path);
errorCount++;
return -1;
}
/* Recursively delete all entries in the directory */
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
- sprintf(filename, "%s/%s", path, entry->name);
+ if (snprintf(filename, sizeof(filename), "%s/%s", path, entry->name) >= sizeof(filename)) {
+ errorCount++;
+ return -1;
+ }
if (rm_dash_r(filename))
return -1;
}
if (PR_CloseDir(dir) != PR_SUCCESS) {
PR_fprintf(errorFD, "Error: Could not close %s.\n", path);
errorCount++;
return -1;
diff --git a/lib/libpkix/pkix/util/pkix_list.c b/lib/libpkix/pkix/util/pkix_list.c
--- a/lib/libpkix/pkix/util/pkix_list.c
+++ b/lib/libpkix/pkix/util/pkix_list.c
@@ -1530,17 +1530,17 @@ cleanup:
*/
PKIX_Error *
PKIX_List_SetItem(
PKIX_List *list,
PKIX_UInt32 index,
PKIX_PL_Object *item,
void *plContext)
{
- PKIX_List *element;
+ PKIX_List *element = NULL;
PKIX_ENTER(LIST, "PKIX_List_SetItem");
PKIX_NULLCHECK_ONE(list);
if (list->immutable){
PKIX_ERROR(PKIX_OPERATIONNOTPERMITTEDONIMMUTABLELIST);
}
diff --git a/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c b/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c
--- a/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c
+++ b/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c
@@ -102,17 +102,17 @@ cleanup:
*/
static PKIX_Error *
pkix_pl_OID_Equals(
PKIX_PL_Object *first,
PKIX_PL_Object *second,
PKIX_Boolean *pResult,
void *plContext)
{
- PKIX_Int32 cmpResult;
+ PKIX_Int32 cmpResult = 0;
PKIX_ENTER(OID, "pkix_pl_OID_Equals");
PKIX_NULLCHECK_THREE(first, second, pResult);
PKIX_CHECK(pkix_pl_OID_Comparator
(first, second, &cmpResult, plContext),
PKIX_OIDCOMPARATORFAILED);

View file

@ -1,27 +0,0 @@
# HG changeset patch
# User Daiki Ueno <dueno@redhat.com>
# Date 1558341826 -7200
# Mon May 20 10:43:46 2019 +0200
# Node ID b447f0046807b718d2928d0e33313620d38a287a
# Parent 02ea5f29ac3c1f1c6e6eb4b655afd9b4fc075a9e
tests: skip TLS 1.3 tests under FIPS mode
diff --git a/tests/ssl/ssl.sh b/tests/ssl/ssl.sh
--- a/tests/ssl/ssl.sh
+++ b/tests/ssl/ssl.sh
@@ -393,6 +393,15 @@ ssl_auth()
echo "${testname}" | grep "TLS 1.3" > /dev/null
TLS13=$?
+ # Currently TLS 1.3 tests are known to fail under FIPS mode,
+ # because HKDF is implemented using the PKCS #11 functions
+ # prohibited under FIPS mode.
+ if [ "${TLS13}" -eq 0 ] && \
+ [ "$SERVER_MODE" = "fips" -o "$CLIENT_MODE" = "fips" ] ; then
+ echo "$SCRIPTNAME: skipping $testname (non-FIPS only)"
+ continue
+ fi
+
if [ "${CLIENT_MODE}" = "fips" -a "${CAUTH}" -eq 0 ] ; then
echo "$SCRIPTNAME: skipping $testname (non-FIPS only)"
elif [ "$ectype" = "SNI" -a "$NORM_EXT" = "Extended Test" ] ; then

115
nss.spec
View file

@ -1,5 +1,5 @@
%global nspr_version 4.21.0
%global nss_version 3.44.1
%global nspr_version 4.29.0
%global nss_version 3.58.0
%global unsupported_tools_directory %{_libdir}/nss/unsupported-tools
%global saved_files_dir %{_libdir}/nss/saved
%global dracutlibdir %{_prefix}/lib/dracut
@ -43,7 +43,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM",
Summary: Network Security Services
Name: nss
Version: %{nss_version}
Release: 2%{?dist}
Release: 3%{?dist}
License: MPLv2.0
URL: http://www.mozilla.org/projects/security/pki/nss/
Requires: nspr >= %{nspr_version}
@ -93,8 +93,6 @@ Source28: nss-p11-kit.config
# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=617723
Patch2: nss-539183.patch
# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1549382
Patch3: nss-module-leak.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,
@ -107,9 +105,14 @@ Patch3: nss-module-leak.patch
# Once the buildroot aha been bootstrapped the patch may be removed
# but it doesn't hurt to keep it.
Patch4: iquote.patch
# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1552767
Patch5: nss-skip-tls13-fips.patch
Patch6: nss-cavs-tests.patch
# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1672703
Patch5: nss-ccs.patch
Patch12: nss-signtool-format.patch
%if 0%{?fedora} < 34
%if 0%{?rhel} < 9
Patch20: nss-gcm-param-default-pkcs11v2.patch
%endif
%endif
%description
Network Security Services (NSS) is a set of libraries designed to
@ -291,16 +294,14 @@ export USE_64=1
%endif
%endif
make -C ./nss/coreconf
make -C ./nss/lib/dbm
# Set the policy file location
# if set NSS will always check for the policy file and load if it exists
export POLICY_FILE="nss.config"
# location of the policy file
export POLICY_PATH="/etc/crypto-policies/back-ends"
make -C ./nss
%{__make} -C ./nss all
%{__make} -C ./nss latest
# build the man pages clean
pushd ./nss
@ -557,7 +558,7 @@ do
done
# Copy some freebl include files we also want
for file in blapi.h alghmac.h
for file in blapi.h alghmac.h cmac.h
do
install -p -m 644 dist/private/nss/$file $RPM_BUILD_ROOT/%{_includedir}/nss3
done
@ -731,6 +732,7 @@ update-crypto-policies &> /dev/null || :
%{_includedir}/nss3/p12plcy.h
%{_includedir}/nss3/p12t.h
%{_includedir}/nss3/pk11func.h
%{_includedir}/nss3/pk11hpke.h
%{_includedir}/nss3/pk11pqg.h
%{_includedir}/nss3/pk11priv.h
%{_includedir}/nss3/pk11pub.h
@ -850,6 +852,7 @@ update-crypto-policies &> /dev/null || :
%{_includedir}/nss3/blapi.h
%{_includedir}/nss3/blapit.h
%{_includedir}/nss3/alghmac.h
%{_includedir}/nss3/cmac.h
%{_includedir}/nss3/lowkeyi.h
%{_includedir}/nss3/lowkeyti.h
@ -874,6 +877,92 @@ update-crypto-policies &> /dev/null || :
%changelog
* Mon Oct 26 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-3
- Revert the last change, always tolerate the first CCS in TLS 1.3
* Thu Oct 22 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-2
- Enable TLS 1.3 middlebox compatibility mode by default
* Tue Oct 20 2020 Daiki Ueno <dueno@redhat.com> - 3.58.0-1
- Update to NSS 3.58
* Sat Sep 19 2020 Daiki Ueno <dueno@redhat.com> - 3.57.0-1
- Update to NSS 3.57
* Mon Aug 24 2020 Daiki Ueno <dueno@redhat.com> - 3.56.0-1
- Update to NSS 3.56
* Sun Aug 2 2020 Daiki Ueno <dueno@redhat.com> - 3.55.0-1
- Update to NSS 3.55
* Wed Jul 15 2020 Daiki Ueno <dueno@redhat.com> - 3.54.0-1
- Update to NSS 3.54
* Fri Jun 5 2020 Bob Relyea <rrelyea@redhat.com> - 3.53.0-2
- Fix non-strict prototype in pk11pub.h
* Mon Jun 1 2020 Daiki Ueno <dueno@redhat.com> - 3.53.0-1
- Update to NSS 3.53
* Wed May 13 2020 Bob Relyea <rrelyea@redhat.com> - 3.52.0-2
- Delay CK_GCM_PARAMS semantics until fedora 34
* Mon May 11 2020 Daiki Ueno <dueno@redhat.com> - 3.52.0-1
- Update to NSS 3.52
* Mon May 4 2020 Daiki Ueno <dueno@redhat.com> - 3.51.1-1
- Update to NSS 3.51.1
* Tue Apr 7 2020 Daiki Ueno <dueno@redhat.com> - 3.51.0-1
- Update to NSS 3.51
* Thu Mar 5 2020 Daiki Ueno <dueno@redhat.com> - 3.50.0-2
- Apply CMAC fixes from upstream
* Mon Feb 17 2020 Daiki Ueno <dueno@redhat.com> - 3.50.0-1
- Update to NSS 3.50
* Mon Jan 27 2020 Daiki Ueno <dueno@redhat.com> - 3.49.2-1
- Update to NSS 3.49.2
- Don't enable TLS 1.3 by default (#1794814)
* Fri Jan 10 2020 Daiki Ueno <dueno@redhat.com> - 3.49.0-1
- Update to NSS 3.49
- Fix build on armv7hl with the patch proposed in upstream
* Fri Jan 3 2020 Daiki Ueno <dueno@redhat.com> - 3.48.0-1
- Update to NSS 3.48
* Tue Dec 3 2019 Daiki Ueno <dueno@redhat.com> - 3.47.1-4
- Update nss-3.47-certdb-temp-cert.patch to avoid setting empty trust value
* Tue Dec 3 2019 Daiki Ueno <dueno@redhat.com> - 3.47.1-3
- Update nss-3.47-certdb-temp-cert.patch to the final version
* Thu Nov 28 2019 Daiki Ueno <dueno@redhat.com> - 3.47.1-2
- Fix intermittent SEC_ERROR_UNKNOWN_ISSUER (#1752303, #1648617)
* Fri Nov 22 2019 Daiki Ueno <dueno@redhat.com> - 3.47.1-1
- Update to NSS 3.47.1
* Thu Nov 7 2019 Bob Relyea <rrelyea@redhat.com> - 3.47.0-3
- Include ike mechanism fix
* Wed Oct 23 2019 Daiki Ueno <dueno@redhat.com> - 3.47.0-2
- Install cmac.h required by blapi.h (#1764513)
* Tue Oct 22 2019 Daiki Ueno <dueno@redhat.com> - 3.47.0-1
- Update to NSS 3.47
* Mon Oct 21 2019 Daiki Ueno <dueno@redhat.com> - 3.46.1-1
- Update to NSS 3.46.1
* Wed Sep 4 2019 Daiki Ueno <dueno@redhat.com> - 3.46.0-2
- Rebuild with NSPR 4.22
* Tue Sep 3 2019 Daiki Ueno <dueno@redhat.com> - 3.46.0-2
- Update to NSS 3.46
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.44.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

View file

@ -3,4 +3,4 @@ SHA512 (blank-cert9.db) = 2f8eab4c0612210ee47db8a3a80c1b58a0b43849551af78c7da403
SHA512 (blank-key3.db) = 01f7314e9fc8a7c9aa997652624cfcde213d18a6b3bb31840c1a60bbd662e56b5bc3221d13874abb42ce78163b225a6dfce2e1326cf6dd29366ad9c28ba5a71c
SHA512 (blank-key4.db) = 8fedae93af7163da23fe9492ea8e785a44c291604fa98e58438448efb69c85d3253fc22b926d5c3209c62e58a86038fd4d78a1c4c068bc00600a7f3e5382ebe7
SHA512 (blank-secmod.db) = 06a2dbd861839ef6315093459328b500d3832333a34b30e6fac4a2503af337f014a4d319f0f93322409e719142904ce8bc08252ae9a4f37f30d4c3312e900310
SHA512 (nss-3.44.1.tar.gz) = eb8777701a25b54377026633b6bf284e4c62308012058355f348a7c57525afe96db74a07de41ba01754e316a7dff06689de527359a5474ed7ab606779c4cf169
SHA512 (nss-3.58.tar.gz) = 03d2ab1517ac07620ea3f02dcf680cf019e0129006ff2559b2d0a047036340c20b98c9679b17a594e5502aa30e158caf309f046901b9ec7c7adeeaa13ec50b80