Commit Graph
154 Commits
Author SHA1 Message Date
Razvan Maries a7c92aa4cd Merge mozilla-inbound to mozilla-central a=merge 2018-11-20 07:03:17 +02:00
Boris Zbarsky a115e66ba1 Bug 1507540 part 3. Use more notxpcom attributes in netwerk/. r=valentin 2018-11-19 20:17:53 -05:00
Junior Hsu 1422d98c29 Bug 1321466 - provide client cert when using proxy with SSL r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D11950
2018-11-17 00:28:30 +00:00
Dana Keeler 40dbcee412 bug 1498686 - avoid acquiring TransportSecurityInfo::mMutex in hot code r=jesup,jcj
Before this patch, Necko functions polling the state of TLS sockets
(essentially, TransportSecurityInfo) would cause a considerable amount of
locking on TransportSecurityInfo::mMutex instances via GetErrorCode(). Most of
this code only cared if an error had been set via SetCanceled(), so this patch
adds an atomic boolean mCanceled (and associated accessor GetCanceled()) that
can be used to the same effect but without acquiring the lock.

Differential Revision: https://phabricator.services.mozilla.com/D8754
2018-10-18 20:08:02 +00:00
Franziskus Kiefer 934c718ab8 Bug 1479787 - use NSS mozpkix in Firefox, r=mt,keeler,glandium
Differential Revision: https://phabricator.services.mozilla.com/D2725
Differential Revision: https://phabricator.services.mozilla.com/D2860
2018-10-02 14:59:34 +02:00
EKR dd338b3634 Bug 1495120 - Wire up ESNI r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D7221
2018-09-28 22:37:20 +00:00
Gurzau Raul 7c2f28c8ff Backed out changeset d2edbb87f3d2 (bug 1495120) for bustages at /security/manager/ssl/nsNSSIOLayer.cpp on a CLOSED TREE 2018-09-29 01:57:00 +03:00
EKR 797a3991f6 Bug 1495120 - Wire up ESNI r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D7221
2018-09-28 22:37:20 +00:00
Dragana Damjanovic fe9c8db4c3 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus 2018-09-22 23:54:11 +03:00
Gurzau Raul b5bc7bfc3d Backed out changeset dc225279994a (bug 1473736) for web platform leaks 2018-09-21 04:30:10 +03:00
Dragana Damjanovic 49db0c9629 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus
Implement necko part of ESNI

Differential Revision: https://phabricator.services.mozilla.com/D2716
2018-09-20 20:53:28 +00:00
Noemi Erli 094eddb80d Backed out changeset 7aa742bff8fb (bug 1473736) for xpcshell failures and bc failures in browser_urlbarSearchSingleWordNotification.js 2018-09-18 22:07:58 +03:00
Dragana Damjanovic 26aa202e86 Bug 1473736 - Implement necko part of ESNI r=mcmanus
Implement necko part of ESNI

Differential Revision: https://phabricator.services.mozilla.com/D2716
2018-09-17 23:08:14 +00:00
Dipen Patel fbf2d8d5d9 Bug 1468222 Consolidate nsISSLStatus info nsITransportSecurityInfo r=Gijs,snorp,jcj,mcmanus,sfraser,keeler,baku,ato
Move all fields of nsISSLStatus to nsITransportSecurityProvider
Remove nsISSLStatus interface and definition
Update all code and test references to nsISSLStatus
Maintain ability to read in older version of serialized nsISSLStatus.  This
is verified with psm_DeserializeCert gtest.

Differential Revision: https://phabricator.services.mozilla.com/D3704
2018-09-11 00:07:30 +00:00
Csoregi Natalia 4c04e1f45b Backed out changeset bd8baf88f373 (bug 1468222) for test_security-info-parser.js failures. CLOSED TREE 2018-09-08 03:16:25 +03:00
Dipen Patel 8e9fd08fb5 Bug 1468222 Consolidate nsISSLStatus info nsITransportSecurityInfo r=snorp,ato,sfraser,keeler,baku,mcmanus,Gijs
Move all fields of nsISSLStatus to nsITransportSecurityProvider
Remove nsISSLStatus interface and definition
Update all code and test references to nsISSLStatus
Maintain ability to read in older version of serialized nsISSLStatus.  This
is verified with psm_DeserializeCert gtest.

Differential Revision: https://phabricator.services.mozilla.com/D3704
2018-09-07 22:50:17 +00:00
Mike Hommey 70e384723c Bug 1489363 - Replace some string.Append* with AppendLiteral. r=froydnj
Depends on D5224

Differential Revision: https://phabricator.services.mozilla.com/D5225
2018-09-07 22:12:04 +00:00
Dana Keeler b3806e6969 bug 1487517 - un-do ciphersuite hiding from bug 1279479 and bug 1316300 r=mt
In bug 1279479 and bug 1316300 we hid some ciphersuites from TLS 1.3
handshakes, assuming we would fall back to TLS 1.2 if the peer needed them.
However, as of bug 1479501, we don't fall back by default, so this just means
we can't negotiate these ciphersuites. This patch un-hides these ciphersuites
from the TLS 1.3 handshake.

Differential Revision: https://phabricator.services.mozilla.com/D4725
2018-08-31 00:18:36 +00:00
David Keeler 0abf865ccc bug 1301547 - remove ancient workaround in client certificate code r=franziskus
Apparently a prehistoric server implementation would send a
certificate_authorities field that didn't include the outer DER SEQUENCE tag, so
PSM attempted to detect this and work around it. Telemetry indicates this is
unnecessary now: https://mzl.la/2Lbi1Lz
2018-07-16 16:30:15 -07:00
Emilio Cobos Álvarez 4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
David Keeler 21b315c2d1 bug 1255120 - add telemetry for client certificate use r=jcj
MozReview-Commit-ID: Et8Fm78Ujxn
2018-05-03 14:29:38 -07:00
Kris Maglione cd1bc42c29 Bug 1453835: Remove unused nsIDataSignatureVerifier utility. r=keeler
MozReview-Commit-ID: ElmHAzKu9TA
2018-04-12 16:19:49 -07:00
Franziskus Kiefer bf83b05857 Bug 1415279 - Move error strings for certError and netError pages to frontend, r=johannh,keeler,Honza,snorp
This patch moves all TLS error string handling to the frontend.
Dev-tools doesn't show the same error code as the page does anymore but only the error code as string.
All logging of these error messages has been removed.

Bug #: 1415279

Differential Revision: https://phabricator.services.mozilla.com/D607
2018-03-27 13:31:52 +02:00
Andrea Marchesini cdb15164d7 Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
David Keeler b81fde5d6f bug 1438196 - fix nsSSLIOLayerMethods definitions r=fkiefer
MozReview-Commit-ID: 4Nu51f1DhSV
2018-03-05 09:12:29 -08:00
Honza Bambas b5784c3b6d Bug 1363284 - HTTP/2 anonymous/onymous session (connection) coalescing, r=mayhemer 2018-02-15 09:10:00 +02:00
Patrick McManus 6f26a97ba2 Bug 1439105 - Ban H2 Client Certs Post Handshake r=bagder,keeler
MozReview-Commit-ID: Dfx5bB5NOBp
2018-02-17 08:10:13 -05:00
David Keeler 96fbe77852 bug 1421084 - part 2/4 - remove nsNSSShutDownObject::isAlreadyShutDown() r=mt,ttaubert
MozReview-Commit-ID: DlS16pHE0Ik
2018-01-23 12:22:56 -08:00
David Keeler ef94d8cd22 bug 1421084 - part 1/4 - remove now-unnecessary nsNSSShutDownPreventionLock r=mt,ttaubert
As of bug 1417680, the NSS shutdown tracking infrastructure is unnecessary (and
does nothing anyway). This series of changesets removes the remaining pieces in
a way that is hopefully easy to confirm is correct.

MozReview-Commit-ID: 8Y5wpsyNlGc
2018-01-23 10:37:47 -08:00
Chris Peterson 677bf4030c Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe
2017-11-05 19:37:28 -08:00
EKR 67b23c17c2 Bug 1430268 - Unconditionally enable compat mode. r=keeler
Summary: Needed for real TLS 1.3 deployment

Reviewers: mt

Differential Revision: https://phabricator.services.mozilla.com/D342
2018-01-13 10:18:53 -08:00
David Keeler 059231b4e5 bug 1425032 - use new "cancel all connections" notification for PKCS#11 logout r=mgoodwin
When the user performs a PKCS#11 logout, we need to cancel all in-progress
network connections. Before this patch, PSM would track all the sockets it
created to implement this feature. However, bug 1411316 added the ability to
cancel these connections by sending the notification
"net:cancel-all-connections". This patch removes the now-unnecessary tracking
machinery in favor of delegating this to necko.

MozReview-Commit-ID: 7IzC14bH2R4
2017-12-13 17:41:02 -06:00
EKR fabadb2c3c Bug 1422156 - Update tlsFlags to change 0x40 to be compat mode rather than 7e02 handshake. r=keeler
Reviewers: keeler

Reviewed By: keeler

Subscribers: mcmanus

Bug #: 1422156

Differential Revision: https://phabricator.services.mozilla.com/D306
2017-12-02 17:18:33 -08:00
Franziskus Kiefer 8c0694f99f Bug 1415795 - revert name change of NSS API, r=ttaubert
MozReview-Commit-ID: Jj72zkfaRh
2017-11-09 13:02:07 +01:00
Martin Thomson 72e975e0b0 Bug 1414735 - Upgrade Firefox to NSS 3.35, r=franziskus UPGRADE_NSS_RELEASE
MozReview-Commit-ID: 6hDnHCWVeWz
2017-11-07 12:24:58 +11:00
Csoregi Natalia 681ebbf7c4 Backed out 1 changesets (bug 1414735)
Backed out changeset f019d4ffff53 (bug 1414735)for failing Gtest TransportTest.TestCipherMismatch and Xpcshell dom/presentation/tests/xpcshell/test_tcp_control_channel.js tests on a CLOSED TREE r=backout UPGRADE_NSS_RELEASE
2017-11-06 12:27:00 +02:00
Martin Thomson 6c603b918f Bug 1414735 - Upgrade Firefox to NSS 3.35, r=franziskus
UPGRADE_NSS_RELEASE

MozReview-Commit-ID: KRx6mpQC4rr
2017-11-06 18:55:42 +11:00
Masatoshi Kimura e29c3d5a3e Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3
2017-10-21 23:53:02 +09:00
David Keeler 3ac07172e6 bug 1381154 - remove smartcard monitoring threads r=jcj,mgoodwin
Modified from bug 1248818 comment 11:
Before this patch, if a user had a smart card (PKCS#11 device) with removable
slots, Firefox would launch a thread for each module and loop, calling
SECMOD_WaitForAnyTokenEvent to be alerted to any insertions/removals. At
shutdown, we would call SECMOD_CancelWait, which would cancel any waiting
threads. However, since that involved calling 3rd party code, we really had no
idea if these modules were behaving correctly (and, indeed, they often weren't,
judging by the shutdown crashes we were getting).
The real solution is to stop relying on PKCS#11, but since that's unlikely in
the near future, the next best thing would be to load these modules in a child
process. That way, misbehaving modules don't cause Firefox to hang/crash/etc.
That's a lot of engineering work, though, so what this patch does is avoids the
issue by never calling SECMOD_WaitForAnyTokenEvent (and thus we never have to
call SECMOD_CancelWait, etc.). Instead, every time Firefox performs an operation
that may be affected by a newly added or removed smart card, it first has NSS
refresh its view of any removable slots. This is similar to how we ensure the
loadable roots module has been loaded (see bug 1372656).

MozReview-Commit-ID: JpmLdV7Vvor
2017-09-28 14:27:21 -07:00
David Keeler d4ed3111e3 bug 1404824 - reconcile inconsistent TLS version range settings by erring on the conservative side r=mayhemer
Before this patch, if a user set their TLS version range preferences to only
allow TLS 1.3, any connections made with the BE_CONSERVATIVE flag or via the
telemetry studies flags would fail because we would attempt to set an
inconsistent TLS version range (the minimum was greater than the maximum). This
fixes that by setting the minimum to the flag-configured maximum. This
intentionally overrides the user's preferences because it is in the context of
browser-critical services (i.e. update servers) or telemetry studies.

MozReview-Commit-ID: 1kKE5nOVQz8
2017-10-03 14:51:57 -07:00
David Keeler a89367b912 bug 1404824 - fix error-handling case of plaintext-layer popping in nsNSSSocketInfo r=mayhemer
The PRFileDesc* returned by PR_PopIOLayer must be used rather than a preexisting
pointer to the layer in question.

MozReview-Commit-ID: 8PsCA5npaj6
2017-10-03 14:29:31 -07:00
David Keeler e53b8eabd4 bug 1400913 - back out the functionality changes from bug 1364159 (but keep the test) r=jcj
Bug 1364159 introduced an optimization that attempted to avoid reading from the
user's cached certificate database as much as possible when building a verified
certificate chain. Unfortunately this had the side-effect of not preferring root
certificates in path building, which can result in unnecessarily long chains
(which rather defeats the purpose, since it means more signature verifications).
This patch reverts the functionality changes from that bug but keeps the test
that was added (the test didn't directly test the functionality changes - it's
more of a check that path building will query the cached certificate db when
necessary).

MozReview-Commit-ID: I56THTLUytH
2017-09-18 10:28:58 -07:00
Valentin Gosu 1e2d8edd75 Bug 1399300 - Backed out changeset a51cf9c048a1 (bug 910207) a=backout
MozReview-Commit-ID: 3l6B9n7VM1o
2017-09-13 10:51:18 +02:00
Honza Bambas 2b8812b8c8 Bug 910207 - Prevent client certificate pop-up coming from a speculative connection, r=dkeeler
MozReview-Commit-ID: IHKzHwsJUiQ
2017-09-01 10:42:00 +02:00
Sebastian Hengst 049b97c4d9 Backed out changeset 9c00078ce6ab (bug 910207) for eslint failure at browser/base/content/test/urlbar/browser_urlbar_search_no_speculative_connect_with_client_cert.js:48: Expected method shorthand. r=backout 2017-09-08 20:42:07 +02:00
Honza Bambas acaf66387b Bug 910207 - Prevent client certificate pop-up coming from a speculative connection, r=dkeeler
MozReview-Commit-ID: CtNPV9kFqJM
2017-09-01 10:42:00 +02:00
Franziskus Kiefer 1111350822 Bug 1304923 - adding key exchange group and signature scheme details to devtools view, r=keeler, Honza
This patch adds the group used for TLS key exchange and the siganture scheme of the certificate to SSLStatus and displays it in devtools.

MozReview-Commit-ID: 7aTj0U5GIvo
2017-08-28 15:29:19 +02:00
Sajjad Arshad 8797d52213 Bug 1391506 - Creating max version, fallback limit, and alt server hello flag values for the tlsFlags r=keeler
Additional-Author: Patrick McManus <[email protected]>

MozReview-Commit-ID: AmsvDtvDGPt
2017-08-29 09:04:08 -04:00
Honza Bambas 79fed89307 Bug 705755 - Handle SSL short-write correctly to save CPU looping. r=keeler 2017-08-29 09:34:00 -04:00
Sajjad Arshad fcbd21c188 Bug 1388925 - Add an opaque flags to have a fine-grained control over TLS configurations. r=mcmanus, r=keeler
This flags is added in the http channel interface by which developers can control the TLS
connections from JavaScript code (e.g. Add-ons). Basically, all the changes accounted for
plumbing this TLS flags from JavaScript level to C++ code responsible for calling NSS
module. We also added a unit test to make sure that separate connections are created if we
use different tlsFlags. Basically we used a concrete set of flag values that covers the
edge cases and check the hashkey generated in the connection info.
2017-08-16 12:41:16 -07:00