The DECRYPT_ERROR_ALERT retry added in this bug only fires when
mEarlyDataWasAvailable is true. Servers that don't advertise
max_early_data_size (e.g. wptserve, many real-world servers) never
hit it, so a stale persisted session ticket surfaces as a fatal
"Secure Connection Failed" instead of being evicted and retried.
- Move PossibleZeroRTTRetryError() into the outer Close() restart
condition so the retry path runs regardless of early-data state.
- Extend the alert list with illegal_parameter, handshake_failure,
decode_error, internal_error, missing_extension, and others that
PSK rejection can plausibly trigger. Cert-validation alerts stay
excluded since they would fail identically on a fresh handshake.
Differential Revision: https://phabricator.services.mozilla.com/D297580
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
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
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