Commit Graph
29 Commits
Author SHA1 Message Date
Dana Keeler 18dfb975cf Bug 1905955 - remove SharedSSLState r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D215533
2024-07-18 00:56:21 +00:00
Valentin Gosu d2a84b09f8 Bug 1851294 - Use nsMainThreadPtrHolder<Promise> to avoid assertion r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D208015
2024-04-22 08:04:35 +00:00
Valentin Gosu c3dde813f4 Bug 1851294 - Add nsITLSSocketControl.asyncStartTLS r=jschanck,necko-reviewers,kershaw
Thunderbird uses nsITLSSocketControl.startTLS to drive the XMPP
connection, but since we started enforcing proper thread safety in
bug 1847260, it's asserting when called on the main thread.

This patch marks StartTLS and proxyStartTLS as [noscript] and adds
asyncStartTLS. This new method dispatches a runnable to the socket thread
to call startTLS, then resolves (or rejects with the nsresult as an arg)
on the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D207692
2024-04-19 09:42:41 +00:00
John Schanck 2a1010d1f4 Bug 1879954 - exempt errors after Server Hello from Xyber retry logic. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D201638
2024-02-15 21:01:33 +00:00
Sandor Molnar 691733fa97 Backed out changeset 451c7a03c400 (bug 1879954) for causing build bustages at security/manager/ssl/nsNSSCallbacks.h CLOSED TREE 2024-02-15 20:58:56 +02:00
John Schanck 4c1158a583 Bug 1879954 - exempt errors after Server Hello from Xyber retry logic. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D201638
2024-02-15 16:59:56 +00:00
John Schanck 58c892707b Bug 1878385 - add xyber768d00 retry logic. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D200494
2024-02-08 23:37:56 +00:00
Kershaw Chang ed4b7110c9 Bug 1851570 - Allow necko to know when client auth is selected to drive TLS handshake, r=necko-reviewers,keeler,valentin
Differential Revision: https://phabricator.services.mozilla.com/D194242
2023-11-22 09:15:39 +00:00
Dana Keeler 8f7101d02e Bug 1840144 - clean up some TLS socket creation error handling r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D193722
2023-11-21 16:41:25 +00:00
Dana Keeler 63db05ab9d Bug 1401466 - make the client auth certificate selection dialog tab modal r=jschanck,necko-reviewers,bolsson,kershaw,valentin
Previously, the client authentication certificate selection dialog could show
up unexpectedly. Because it was modal, it would prevent user interaction with
the browser. It could even get in a state where the dialog couldn't be
interacted with, and neither could anything else, so the entire browser would
be locked and the user would have to quit and restart.

This patch associates a top-level outer content window ID (called "browserId"
in networking code) with each NSSSocketControl. When a peer asks for a client
authentication certificate, the NSSSocketControl can use the ID to find the
relevant tab and open a tab-modal dialog, which allows other browser UI to be
interacted with.

Some loads cannot be associated with browser tabs, and so the implementation
falls back to opening a window-modal dialog on the most recently active window.
This is still better than the previous implementation, since the dialog is
connected to a window rather than being its own separate dialog.

Differential Revision: https://phabricator.services.mozilla.com/D183775
2023-08-30 03:05:35 +00:00
Cosmin Sabou 816e584379 Backed out changeset 16c71fac6426 (bug 1401466) for causing SocketControl related fuzzing build bustages. CLOSED TREE 2023-08-30 00:37:21 +03:00
Dana Keeler 709eefb9c7 Bug 1401466 - make the client auth certificate selection dialog tab modal r=jschanck,necko-reviewers,bolsson,kershaw,valentin
Previously, the client authentication certificate selection dialog could show
up unexpectedly. Because it was modal, it would prevent user interaction with
the browser. It could even get in a state where the dialog couldn't be
interacted with, and neither could anything else, so the entire browser would
be locked and the user would have to quit and restart.

This patch associates a top-level outer content window ID (called "browserId"
in networking code) with each NSSSocketControl. When a peer asks for a client
authentication certificate, the NSSSocketControl can use the ID to find the
relevant tab and open a tab-modal dialog, which allows other browser UI to be
interacted with.

Some loads cannot be associated with browser tabs, and so the implementation
falls back to opening a window-modal dialog on the most recently active window.
This is still better than the previous implementation, since the dialog is
connected to a window rather than being its own separate dialog.

Differential Revision: https://phabricator.services.mozilla.com/D183775
2023-08-29 20:47:45 +00:00
Dana Keeler 90ad9a5099 Bug 1835103 - reset speculative connections where the peer asks for a client authentication certificate r=jschanck,kershaw
Speculative connections to servers that request a client authentication
certificate can't make progress, because PSM buffers the "select a client
authentication certificate" dialog (otherwise, the dialog would show up
unexpectedly), but Necko won't claim the connection until the TLS handshake has
completed (which it won't, because the user needs to select a client
authentication certificate first). So, the only option is to cancel the
connection and have Necko make a new non-speculative connection.

Differential Revision: https://phabricator.services.mozilla.com/D180134
2023-06-09 22:49:16 +00:00
Dana Keeler 94dc5b9ec4 Bug 1813618 - buffer client auth certificate selection UI for speculative connections r=valentin,jschanck,necko-reviewers,kershaw
When necko makes a speculative connection, the peer may ask for a client
authentication certificate. This patch makes it so that when this happens,
no certificate selection UI will be shown until the connection is claimed (as
in, it is no longer merely speculative).

Differential Revision: https://phabricator.services.mozilla.com/D175528
2023-04-18 17:52:49 +00:00
Dana Keeler b89de3d236 Bug 1289186 - wait for the server certificate to verify successfully before asking for a client auth certificate r=jschanck
If a TLS server asks for a client authentication certificate, no dialog asking
the user to select one should be shown until the server's certificate verifies
successfully.

Differential Revision: https://phabricator.services.mozilla.com/D175170
2023-04-13 18:52:18 +00:00
Narcis Beleuzu 21de333bb3 Backed out changeset a5064c22d601 (bug 1289186) for Bp-hybrid bustages on NSSSocketControl.h . CLOSED TREE 2023-04-12 22:03:22 +03:00
Dana Keeler ac7086f903 Bug 1289186 - wait for the server certificate to verify successfully before asking for a client auth certificate r=jschanck
If a TLS server asks for a client authentication certificate, no dialog asking
the user to select one should be shown until the server's certificate verifies
successfully.

Differential Revision: https://phabricator.services.mozilla.com/D175170
2023-04-12 16:21:38 +00:00
serge-sans-paille a5bc7d11e9 Bug 1820573 - Make security/ buildable outside of a unified build environment r=andi,keeler
Differential Revision: https://phabricator.services.mozilla.com/D171732
2023-03-15 07:30:36 +00:00
Dana Keeler a9bcca7130 Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-16 16:37:29 +00:00
Dana Keeler 41b8e4ba29 Bug 1791633 - rename nsISSLSocketControl to nsITLSSocketControl and move it and nsITransportSecurityInfo to PSM r=necko-reviewers,kershaw
Depends on D160310

Differential Revision: https://phabricator.services.mozilla.com/D160311
2022-11-16 16:37:29 +00:00
Dana Keeler b51c8a10df Bug 1791633 - rename nsNSSSocketInfo to NSSSocketControl and move to its own file r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D160310
2022-11-16 16:37:28 +00:00
Marian-Vasile Laza f986221d71 Backed out 3 changesets (bug 1791633) for causing bustages on TransportSecurityInfo.cpp. CLOSED TREE
Backed out changeset 23b864e14db0 (bug 1791633)
Backed out changeset 0bcba3375ec0 (bug 1791633)
Backed out changeset ab0ea0d68f5c (bug 1791633)
2022-11-15 23:51:58 +02:00
Dana Keeler f608ea9a59 Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-15 20:03:29 +00:00
Dana Keeler a9d672e5f2 Bug 1791633 - rename nsISSLSocketControl to nsITLSSocketControl and move it and nsITransportSecurityInfo to PSM r=necko-reviewers,kershaw
Depends on D160310

Differential Revision: https://phabricator.services.mozilla.com/D160311
2022-11-15 20:03:29 +00:00
Dana Keeler 7eb6713e4d Bug 1791633 - rename nsNSSSocketInfo to NSSSocketControl and move to its own file r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D160310
2022-11-15 20:03:28 +00:00
Butkovits Atila a9f1f1a451 Backed out 3 changesets (bug 1791633) for causing build bustages at nsHttpConnectionMgr.cpp:. CLOSED TREE
Backed out changeset ee9744982673 (bug 1791633)
Backed out changeset f5a4bfdaba40 (bug 1791633)
Backed out changeset f57131b9cfe2 (bug 1791633)
2022-11-15 08:07:16 +02:00
Dana Keeler 4f397cbfed Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-15 05:34:40 +00:00
Dana Keeler 7ec4b8f2d7 Bug 1791633 - rename nsISSLSocketControl to nsITLSSocketControl and move it and nsITransportSecurityInfo to PSM r=necko-reviewers,kershaw
Depends on D160310

Differential Revision: https://phabricator.services.mozilla.com/D160311
2022-11-15 05:34:40 +00:00
Dana Keeler 2003b3cfe7 Bug 1791633 - rename nsNSSSocketInfo to NSSSocketControl and move to its own file r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D160310
2022-11-15 05:34:39 +00:00