diff options
Diffstat (limited to 'dev-libs/nss')
-rw-r--r-- | dev-libs/nss/Manifest | 11 | ||||
-rw-r--r-- | dev-libs/nss/files/nss-3.58-always-tolerate-the-first-CCS-in-TLS1.3.patch | 200 | ||||
-rw-r--r-- | dev-libs/nss/nss-3.56.ebuild | 2 | ||||
-rw-r--r-- | dev-libs/nss/nss-3.58-r2.ebuild (renamed from dev-libs/nss/nss-3.55.ebuild) | 15 | ||||
-rw-r--r-- | dev-libs/nss/nss-3.59.ebuild (renamed from dev-libs/nss/nss-3.57.ebuild) | 0 |
5 files changed, 219 insertions, 9 deletions
diff --git a/dev-libs/nss/Manifest b/dev-libs/nss/Manifest index 82ed331151cb..d34c255c9f8a 100644 --- a/dev-libs/nss/Manifest +++ b/dev-libs/nss/Manifest @@ -2,11 +2,12 @@ AUX nss-3.21-gentoo-fixup-warnings.patch 178 BLAKE2B b51f80310db3db416d8aeaf9117 AUX nss-3.23-hppa-byte_order.patch 460 BLAKE2B 97358cc8fbea0b0d3beee0697833e48ef01039ceb08fd00792a7f7ef68409eb076022c03764ab079fdaa971a0358130002fa11c0c182ebeb33dcdf660be26408 SHA512 ad0097bb6cf409d61eb28202d7460c87e983d6db977aba38ff9ef2749b3f7bb8fdadce4174f5bf806350ae33733097a1f444792d31cc43574b28341893642e5a AUX nss-3.53-fix-building-on-ppc.patch 1206 BLAKE2B e6189802769197b290fd332ee2b7d074c0bacf47313998117734dafd1eb6a536db19bc8a329944d9fad51a6f9f90f81d98181272e0068bf852fea7ca928d2713 SHA512 859162070aa3c5e6e8be259f5e6648d37a5194a02958310f8caf56ff772dcaa4ebb26e4d754c99608fc7a45b641c5088cccd9e2c7d9c92c5ccc85c6b47320720 AUX nss-3.53-gentoo-fixups.patch 6886 BLAKE2B 1c605d8db02ebe0492c41955207368197a79990e43e219a71962cb28ac0cecd9e0acc2b76e16f5b116fdb8bf8790d96046cb4f376df9b8634ac48e54924589f8 SHA512 51031f92519f57d4b57a547cf549f2d5da1c5a7212d4b304fb0d71d6a85a5aefd64724ec9075c14c9b49c1e99c3ffe91cbec501c3504985aa9b16eacf2aa15ed -DIST nss-3.55.tar.gz 81759883 BLAKE2B 5b663d2b1861eb74cf070f2711b4db1afbfbc40b08e1f117e6b4a62e9f997de06889de3afc654cf6547c371ab2a1183904a1a014d1dc4b3e94f734107c81e1cf SHA512 acae7b803a3219cd4b78216cb8a6352805741e42eca6a42a5e6289ebbabc6189c7c6bc138cbd8a93d8631d06175c4d34e72957d49fe726adada6aaa2566e399e +AUX nss-3.58-always-tolerate-the-first-CCS-in-TLS1.3.patch 8546 BLAKE2B 25c222f44f714226364dbda760989e7e255ab93a79121238ccce2962c346c37971a8440e8cc16ac5555f78c15b7a1b72e7311a7b7257b254fefe7e9a75d94924 SHA512 79fff678895a5643b34c42a0b0d34299b1b63c19baf0bbeb43fcee6b7f01bb24baf7047261b16e913d39fe9e69a637c7dc2bba0fec9ceedd43fa4f5dcc99f38f DIST nss-3.56.tar.gz 81706176 BLAKE2B 84c3b9fd649ce38ad843725b180982692dcac34e851734813b959734054f2e9ebfad66496de320f46e861381f6d5f52db0cc4c0953f7504b79f6b529b871f173 SHA512 f2eed8252c13b38a4d80a11203136d22a521205f814b6d954cc119ccf8921fcb8f689d919944bea4739d1575e9bda7e13cf2ad054ac91d51e049abe246efc845 -DIST nss-3.57.tar.gz 81712830 BLAKE2B 998160fe16e13d1997f3d11a054148349b068214afb3c0cd3b9e82ce03999e46ca34b02907dc27e3f253653f6e57a9f1498e6c16f8665350c629f5c3c98ea0bc SHA512 7e312d7539a26f57b968548935a7715cfa895aa61da21d0542ae45b71cb16f63167728534cdfd15f8eca68c75753a0df3d05e87b4c5acaabbda63c736e552ea2 +DIST nss-3.58.tar.gz 81846254 BLAKE2B f8e7d0b231916b197ad21706a057d055f8377059d76d4f09aff523cc4cd071a3184f02dc488259df22109b70be7b8a5d5fa7ea2273a830de825cc9a8c95dcca9 SHA512 03d2ab1517ac07620ea3f02dcf680cf019e0129006ff2559b2d0a047036340c20b98c9679b17a594e5502aa30e158caf309f046901b9ec7c7adeeaa13ec50b80 +DIST nss-3.59.tar.gz 82141516 BLAKE2B 74959b14ec42b4628dfc3365af00420cdbd41d202541e9379f6a4448c4496b76307af48c9ec405b370f8770327ce56742b4382f8cd49724b42732ce5cc5b0779 SHA512 8963e846f2ff7222457ae59f042672cf4e44f7752807226f46c215a772fd1cbd65d0ce634da4afb698eabd4eb1c1e78146cc2a089339ada11da03d259c609a38 DIST nss-cacert-class1-class3.patch 22950 BLAKE2B 9d5e60df5f161a3c27c41e5a9419440a54f888eda454e3cde5ebe626d4075b65cf9938b5144d0fb022377f4bd415bff5e5c67d104409860aa9391b3eb8872c68 SHA512 a5aa740bf110a3f0262e3f1ef2fc739ac2b44f042e220039d48aee8e97cd764d5c10718220364f4098aba955882bd02cadb5481512388971a8290312f88a7df0 -EBUILD nss-3.55.ebuild 8992 BLAKE2B 45d0ef7e3ecac0a19c75b5193cf3f21aad28fce9ee03d30785cd133c0357e3b71e62800154ce22df775e168a0eb5f99601db55f90bc3271d2ea5a8faee2a580f SHA512 8bbcd696bfd436eb76d4eee53db228c2d8c1351217ae9e171fd1e9a38e7c4903ff303c6931be733f3e2153e474f65668567bf720d6840f7325145b179d99b14f -EBUILD nss-3.56.ebuild 9199 BLAKE2B c160f683fae9ad0164ff180a097128e1684e81c06304d53d54a0212c8e67df9e0ee7329a5bd52f98914281b1a18ffa09757978e024690110bd1fde6d7bfd2f3f SHA512 38b958860ec278b2140282454b7a3e2c280520188ec4cf295ade69efeda3cb31580128df7e9e1240cc5c20010a022364d1ac95d36771b4987f04cd732e4a53bf -EBUILD nss-3.57.ebuild 9195 BLAKE2B 863b9a0187c0cff4ece023fcc84e90ba4560ad27a59b561ee48b2d2d3866ceea0b7fdfe6ee3ea8865264f98f4b44491f65ce7ef955064cb9606e21eaccb072a4 SHA512 5c5fa7be3f3e080310868e8458b64973f2c849eb28663bc7f7eced5fe8415a06fd5005c676a28eb494d0e7eda32fa05c1f5b3fea275b0fa8d0282e9f5e76e055 +EBUILD nss-3.56.ebuild 9192 BLAKE2B 159708f6fc8c0b2e55404b95bbe688798f3f691ecb6e62a87e9ae32b08c9e9ae6693bb959a7af3232694ee0c97e5b8bef1981156152c17d8ea4a7c121885bfc3 SHA512 56597eeacea300e066177e9fd83d646a0bc5f84e580ac4dfd952ffcfb67ab77f738126b21cae44966d12ec6bb6e9b50f44a8ac9cf2304bb2f95b41fbe144b78f +EBUILD nss-3.58-r2.ebuild 9258 BLAKE2B dc108ae1b31d12f42c34b1938e99438d4f7c7c62cc681c880f458ee8c90ae7b5e0374fa80528c95b1372489c7537059af68570901a72094d240ddb3860297eca SHA512 34c05b3c3cf11ab13b32c68e859aa23f573f4875be76279c6b814e2f750c7bc5329cc6b180e83b4322debfac5f48e0296af3611a23b83682f4d5e472309c0ac8 +EBUILD nss-3.59.ebuild 9195 BLAKE2B 863b9a0187c0cff4ece023fcc84e90ba4560ad27a59b561ee48b2d2d3866ceea0b7fdfe6ee3ea8865264f98f4b44491f65ce7ef955064cb9606e21eaccb072a4 SHA512 5c5fa7be3f3e080310868e8458b64973f2c849eb28663bc7f7eced5fe8415a06fd5005c676a28eb494d0e7eda32fa05c1f5b3fea275b0fa8d0282e9f5e76e055 MISC metadata.xml 515 BLAKE2B a63fb05a1a3e1b06f929f963ab0794ec1230e89903fc97a7c7db81a0b3c7b7e8b9277eaa7440f8929738ec0f805d8a8dd51c8262e569fb9be2fa0938b08ad7a2 SHA512 6bec952825416ba0ab8282669483eb75935f6b4a3052e0f78dad911c0246b8d8ce245c86cbd82b292d49338848fa50fb2009fb4a9def1ac8d81bf9a3320cd2b0 diff --git a/dev-libs/nss/files/nss-3.58-always-tolerate-the-first-CCS-in-TLS1.3.patch b/dev-libs/nss/files/nss-3.58-always-tolerate-the-first-CCS-in-TLS1.3.patch new file mode 100644 index 000000000000..a92c03899360 --- /dev/null +++ b/dev-libs/nss/files/nss-3.58-always-tolerate-the-first-CCS-in-TLS1.3.patch @@ -0,0 +1,200 @@ + +# HG changeset patch +# User Daiki Ueno <dueno@redhat.com> +# Date 1603691171 -3600 +# 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 + +--- a/gtests/ssl_gtest/ssl_tls13compat_unittest.cc ++++ b/gtests/ssl_gtest/ssl_tls13compat_unittest.cc +@@ -343,29 +343,28 @@ TEST_F(TlsConnectStreamTls13, ChangeCiph + // Client sends CCS before starting the handshake. + client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); + client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); + ConnectExpectAlert(server_, kTlsAlertUnexpectedMessage); + server_->CheckErrorCode(SSL_ERROR_RX_UNEXPECTED_CHANGE_CIPHER); + 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); + + StartConnect(); + 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 + // indicates compatibility mode with non-empty session ID. + TEST_F(Tls13CompatTest, ChangeCipherSpecAfterClientHelloTwice) { + EnsureTlsSetup(); + ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3); + EnableCompatMode(); +@@ -376,36 +375,37 @@ TEST_F(Tls13CompatTest, ChangeCipherSpec + client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); + client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); + + server_->ExpectSendAlert(kTlsAlertUnexpectedMessage); + server_->Handshake(); // Consume ClientHello and CCS. + 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(); + ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3); + + // To replace Finished with a CCS below + auto filter = MakeTlsFilter<TlsHandshakeDropper>(server_); + filter->SetHandshakeTypes({kTlsHandshakeFinished}); + filter->EnableDecryption(); + + StartConnect(); + client_->Handshake(); // Send ClientHello + server_->Handshake(); // Consume ClientHello, and + // 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 + // client indicates compatibility mode with non-empty session ID. + TEST_F(Tls13CompatTest, ChangeCipherSpecAfterServerHelloTwice) { + EnsureTlsSetup(); + ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3); + EnableCompatMode(); +--- a/lib/ssl/ssl3con.c ++++ b/lib/ssl/ssl3con.c +@@ -6640,21 +6640,17 @@ ssl_CheckServerSessionIdCorrectness(sslS + if (sentFakeSid) { + return !sidMatch; + } + return PR_TRUE; + } + + /* 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. */ + return sidBytes->len == 0; + } + + static SECStatus + ssl_CheckServerRandom(sslSocket *ss) +@@ -8691,17 +8687,16 @@ ssl3_HandleClientHello(sslSocket *ss, PR + if (sidBytes.len > 0 && !IS_DTLS(ss)) { + SECITEM_FreeItem(&ss->ssl3.hs.fakeSid, PR_FALSE); + rv = SECITEM_CopyItem(NULL, &ss->ssl3.hs.fakeSid, &sidBytes); + if (rv != SECSuccess) { + desc = internal_error; + errCode = PORT_GetError(); + goto alert_loser; + } +- ss->ssl3.hs.allowCcs = PR_TRUE; + } + + /* TLS 1.3 requires that compression include only null. */ + if (comps.len != 1 || comps.data[0] != ssl_compression_null) { + goto alert_loser; + } + + /* If there is a cookie, then this is a second ClientHello (TLS 1.3). */ +@@ -13061,25 +13056,24 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip + * will fail if the server fails to negotiate compatibility mode in a + * 0-RTT session that is resumed from a session that did negotiate it. + * We don't care about that corner case right now. */ + if (ss->version >= SSL_LIBRARY_VERSION_TLS_1_3 && + cText->hdr[0] == ssl_ct_change_cipher_spec && + 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)) || + (!IS_DTLS(ss) && ss->sec.isServer && + ss->ssl3.hs.zeroRttIgnore == ssl_0rtt_ignore_trial)) { + /* Silently drop the packet unless we sent a fatal alert. */ + if (ss->ssl3.fatalAlertSent) { + return SECFailure; +--- a/lib/ssl/sslimpl.h ++++ b/lib/ssl/sslimpl.h +@@ -705,20 +705,17 @@ typedef struct SSL3HandshakeStateStr { + sslZeroRttIgnore zeroRttIgnore; /* Are we ignoring 0-RTT? */ + ssl3CipherSuite zeroRttSuite; /* The cipher suite we used for 0-RTT. */ + PRCList bufferedEarlyData; /* Buffered TLS 1.3 early data + * on server.*/ + PRBool helloRetry; /* True if HelloRetryRequest has been sent + * 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 + * we use for TLS 1.3 */ + PRUint16 ticketNonce; /* A counter we use for tickets. */ + SECItem fakeSid; /* ... (server) the SID the client used. */ + + /* rttEstimate is used to guess the round trip time between server and client. + diff --git a/dev-libs/nss/nss-3.56.ebuild b/dev-libs/nss/nss-3.56.ebuild index db3bc67fd55f..fd9f45030fa8 100644 --- a/dev-libs/nss/nss-3.56.ebuild +++ b/dev-libs/nss/nss-3.56.ebuild @@ -15,7 +15,7 @@ SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/$ LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" IUSE="cacert utils" # pkg-config called by nss-config -> virtual/pkgconfig in RDEPEND RDEPEND=" diff --git a/dev-libs/nss/nss-3.55.ebuild b/dev-libs/nss/nss-3.58-r2.ebuild index 827349d454c0..38528576dc70 100644 --- a/dev-libs/nss/nss-3.55.ebuild +++ b/dev-libs/nss/nss-3.58-r2.ebuild @@ -3,13 +3,13 @@ EAPI=7 -inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal +inherit flag-o-matic multilib toolchain-funcs multilib-minimal -NSPR_VER="4.26" +NSPR_VER="4.29" RTM_NAME="NSS_${PV//./_}_RTM" DESCRIPTION="Mozilla's Network Security Services library that implements PKI support" -HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/" +HOMEPAGE="https://www.mozilla.org/projects/security/pki/nss/" SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz cacert? ( https://dev.gentoo.org/~axs/distfiles/${PN}-cacert-class1-class3.patch )" @@ -40,6 +40,7 @@ PATCHES=( "${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch" "${FILESDIR}/${PN}-3.23-hppa-byte_order.patch" "${FILESDIR}/${PN}-3.53-fix-building-on-ppc.patch" + "${FILESDIR}/${PN}-3.58-always-tolerate-the-first-CCS-in-TLS1.3.patch" ) src_prepare() { @@ -161,6 +162,14 @@ multilib_src_compile() { export USE_SYSTEM_ZLIB=1 export ZLIB_LIBS=-lz export ASFLAGS="" + # Fix build failure on arm64 + export NS_USE_GCC=1 + # Detect compiler type and set proper environment value + if tc-is-gcc; then + export CC_IS_GCC=1 + elif tc-is-clang; then + export CC_IS_CLANG=1 + fi local d diff --git a/dev-libs/nss/nss-3.57.ebuild b/dev-libs/nss/nss-3.59.ebuild index 37ab7c58696f..37ab7c58696f 100644 --- a/dev-libs/nss/nss-3.57.ebuild +++ b/dev-libs/nss/nss-3.59.ebuild |