Commit graph

213 commits

Author SHA1 Message Date
Dana Keeler
1a2ff46b6e 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
d1189f7803 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
9c44d165bb 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
0a13b94a8f 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
bd6502dc63 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
f3f66bf7e5 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
a7fbd7a3a0 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
0da2ba4f53 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
Dana Keeler
0dedda0179 Bug 1720118 - store certificate error override and failed certificate chain information in the TLS token cache r=kershaw,jschanck,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158793
2022-10-12 23:54:11 +00:00
Cristian Tuns
f2f36b1381 Backed out 2 changesets (bug 1720118) for causing Hybrid bustages on nsHashtablesFwd.h CLOSED TREE
Backed out changeset af570580e2f7 (bug 1720118)
Backed out changeset 57b8a6400749 (bug 1720118)
2022-10-12 14:20:47 -04:00
Dana Keeler
eab44906ca Bug 1720118 - store certificate error override and failed certificate chain information in the TLS token cache r=kershaw,jschanck,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158793
2022-10-12 17:43:29 +00:00
Dennis Jackson
a0e440195f Bug 1788290 - Record whether OCSP requests were made whilst making a TLS connection. r=keeler,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D156105
2022-09-02 20:59:34 +00:00
Butkovits Atila
7fed5a7ef2 Backed out 3 changesets (bug 1788290) for causing build bustages. CLOSED TREE
Backed out changeset 52d5a06be477 (bug 1788290)
Backed out changeset a3b5d214b5d4 (bug 1788290)
Backed out changeset e94a38b79965 (bug 1788290)
2022-09-02 19:13:34 +03:00
Dennis Jackson
0e389c049e Bug 1788290 - Record whether OCSP requests were made whilst making a TLS connection. r=keeler,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D156105
2022-09-02 14:16:07 +00:00
Dana Keeler
56e7ae8648 Bug 1781104 - replace error type booleans with error category in nsITransportSecurityInfo r=necko-reviewers,mixedpuppy,jschanck,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D154561
2022-08-26 18:48:38 +00:00
Dana Keeler
b4c45d4248 Bug 1781104 - remove unnecessary bits parameter from nsICertOverrideService r=djackson,necko-reviewers,geckoview-reviewers,extension-reviewers,kershaw,calu
Differential Revision: https://phabricator.services.mozilla.com/D152826
2022-08-26 18:48:38 +00:00
Dana Keeler
30b914478f Bug 1779973 - treat failure to parse certificate validity as a time error r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D152333
2022-07-21 23:51:01 +00:00
Dana Keeler
dc4ce8d406 Bug 1777366 - remove unused source and cached parameters from nsISiteSecurityService APIs r=rmf,necko-reviewers,kershaw
These parameters are no longer used and can be removed, along with the expired
telemetry HSTS_UPGRADE_SOURCE.

Differential Revision: https://phabricator.services.mozilla.com/D150786
2022-07-05 18:33:18 +00:00
Dana Keeler
9e12ff8e96 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 23:20:58 +00:00
Butkovits Atila
2b78c018fd Backed out 3 changesets (bug 1770869) for causing xpcshell failures at test_tls_server.js. CLOSED TREE
Backed out changeset 5c95392b800d (bug 1770869)
Backed out changeset 149d04a209b6 (bug 1770869)
Backed out changeset 5a138d047be1 (bug 1770869)
2022-06-02 00:18:26 +03:00
Dana Keeler
39015f9d16 Bug 1770869 - remove nsISSLSocketControl.clientCert r=jschanck,necko-reviewers,kershaw
This field isn't used any longer and removing it will make future changes
eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D147227
2022-06-01 20:00:57 +00:00
Dana Keeler
3945602079 Bug 1766687 - remove support for SHA1 signatures in all certificates (including imported roots) r=jschanck
Previously [0], support for SHA1 signatures in certificates was disabled by
default, except for certificates issued by imported roots. Chrome had a similar
policy, but this was removed in 71 [1]. Telemetry [2] indicates that some users
do still encounter SHA1 signatures at a fraction of the rate of overall
certificate errors, so forbidding all SHA1 signatures should have minimal
compatibility impact.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1302140
[1] https://chromeenterprise.google/policies/#EnableSha1ForLocalAnchors
[2] https://mzl.la/3kg5J4j

Differential Revision: https://phabricator.services.mozilla.com/D144870
2022-06-01 17:01:56 +00:00
Noemi Erli
aca984c8a8 Backed out changeset 8ef044a6a1fe (bug 1766687) for causing bustage in NSSCertDBTrustDomain.cpp 2022-06-01 02:35:17 +03:00
Dana Keeler
527bfba679 Bug 1766687 - remove support for SHA1 signatures in all certificates (including imported roots) r=jschanck
Previously [0], support for SHA1 signatures in certificates was disabled by
default, except for certificates issued by imported roots. Chrome had a similar
policy, but this was removed in 71 [1]. Telemetry [2] indicates that some users
do still encounter SHA1 signatures at a fraction of the rate of overall
certificate errors, so forbidding all SHA1 signatures should have minimal
compatibility impact.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1302140
[1] https://chromeenterprise.google/policies/#EnableSha1ForLocalAnchors
[2] https://mzl.la/3kg5J4j

Differential Revision: https://phabricator.services.mozilla.com/D144870
2022-05-31 20:24:33 +00:00
John Schanck
6028a138e9 Bug 1691122 - Remove subject common name fallback support in CertVerifier. r=keeler,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D143808
2022-04-28 19:48:06 +00:00
Butkovits Atila
94e2a597f6 Backed out changeset 0599b2a0913a (bug 1691122) for causing failures at test_peerConnection_basicAudioNATRelayTLS.html. CLOSED TREE 2022-04-28 03:58:05 +03:00
John Schanck
ea5479a8d7 Bug 1691122 - Remove subject common name fallback support in CertVerifier. r=keeler,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D143808
2022-04-27 20:57:31 +00:00
Dana Keeler
6502ebf4b6 Bug 1608307 - remove redundant flags parameters from nsISiteSecurityService r=jschanck,necko-reviewers,kershaw
Before this patch, nsISiteSecurityService APIs took "flags" parameters that
differentiated private contexts from not private contexts. However, these
parameters were redundant with respect to origin attributes, which led to some
confusion for consumers of these APIs. This patch removes these parameters in
favor of using origin attributes.

Differential Revision: https://phabricator.services.mozilla.com/D142901
2022-04-06 17:37:23 +00:00
Dana Keeler
161c96d597 Bug 1751078 - avoid passing an extra copy of the server certificate's bytes during verification r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D136680
2022-01-26 21:23:50 +00:00
Dana Keeler
b9b204d558 Bug 1751078 - prefer nsIX509Cert over the concrete class r=necko-reviewers,jschanck,kershaw
This patch updates some uses of RefPtr<nsNSSCertificate> to
nsCOMPtr<nsIX509Cert> because it's not necessary to use the concrete class.
This patch also removes some empty files that should have been removed in a
previous bug.

Differential Revision: https://phabricator.services.mozilla.com/D136679
2022-01-26 21:23:50 +00:00
Dana Keeler
36d40547fa Bug 1751078 - use mozilla::pkix to do time comparisons in DetermineCertOverrideErrors r=jschanck
Firefox uses mozilla::pkix to implement certificate verification. Before this
patch, though, DetermineCertOverrideErrors still used NSS to determine if a
certificate had any time-related errors (in addition to the primary error
returned by verification). This wasn't great from a consistency and
attack-surface point of view, so this patch updates that function to use
mozilla::pkix as well.

Differential Revision: https://phabricator.services.mozilla.com/D136678
2022-01-26 21:23:50 +00:00
Dana Keeler
e184b598ae Bug 1751078 - remove unnecessary CERTCertificate instantiation in TLS telemetry r=jschanck
After successfully verifying a TLS server certificate, Firefox collects some
telemetry based on the built certificate chain's root certificate. Before this
patch, the implementation would unnecessarily create CERTCertificates out of
the built cert chain (unnecessary because the telemetry only relies on the
bytes of the root certificate). This patch avoids the unnecessary work.

Differential Revision: https://phabricator.services.mozilla.com/D136677
2022-01-26 21:23:49 +00:00
Dana Keeler
05c772d969 Bug 1751078 - remove SSL_SERVER_AUTH_EKU telemetry probe r=jschanck
SSL_SERVER_AUTH_EKU has served its purpose. It has demonstrated that in the web
PKI (as defined by TLS web server certificates that chain up to root
certificates in Mozilla's CA program), all server certificates will have the
EKU extension, and the extension will be valid for TLS server authentication.
We no longer need to gather this data, so this patch removes this probe.

Differential Revision: https://phabricator.services.mozilla.com/D136676
2022-01-26 21:23:49 +00:00
Dana Keeler
9af0bfbdd8 Bug 1750089 - remove some unnecessary uses of nsIX509Cert::GetCert() r=jschanck
nsIX509Cert::GetCert() may cause a CERTCertificate to be instantiated. Doing so
can have performance and stability implications, so it's best to avoid it.
This patch avoids it where possible.

Differential Revision: https://phabricator.services.mozilla.com/D135945
2022-01-19 21:24:47 +00:00
Iulian Moraru
d8fce573b5 Backed out 2 changesets (bug 1750089) for causing mochitest failures on browser_webconsole_certificate_messages.js.
Backed out changeset 7ebb345a9293 (bug 1750089)
Backed out changeset 40bd1975208d (bug 1750089)
2022-01-19 04:07:44 +02:00
Dana Keeler
2d07f1cf5d Bug 1750089 - remove some unnecessary uses of nsIX509Cert::GetCert() r=jschanck
nsIX509Cert::GetCert() may cause a CERTCertificate to be instantiated. Doing so
can have performance and stability implications, so it's best to avoid it.
This patch avoids it where possible.

Depends on D135943

Differential Revision: https://phabricator.services.mozilla.com/D135945
2022-01-18 23:54:12 +00:00
Dana Keeler
a5b07a3a15 Bug 1748341 - remove superfluous nsNSSCertificate "constructors" r=necko-reviewers,kershaw,jschanck
nsNSSCertificate had a few functions that acted as constructors. This patch
removes these unnecessary functions and uses actual constructors.

Depends on D134977

Differential Revision: https://phabricator.services.mozilla.com/D134978
2022-01-13 22:10:51 +00:00
Narcis Beleuzu
255a2c1d2d Backed out 4 changesets (bug 1748341) for causing Bug 1749735 . a=pascal
Backed out changeset 667470bfefbb (bug 1748341)
Backed out changeset 4c8bf5c43e12 (bug 1748341)
Backed out changeset 7aa1f58a893e (bug 1748341)
Backed out changeset 1e1f1620d1bb (bug 1748341)
2022-01-12 18:31:40 +02:00
Dana Keeler
aff97c6002 Bug 1748341 - remove superfluous nsNSSCertificate "constructors" r=necko-reviewers,kershaw,jschanck
nsNSSCertificate had a few functions that acted as constructors. This patch
removes these unnecessary functions and uses actual constructors.

Depends on D134977

Differential Revision: https://phabricator.services.mozilla.com/D134978
2022-01-12 00:40:14 +00:00
Dana Keeler
d74d5e91d6 Bug 1712972 - only call IsCertBuiltInRoot on the socket thread during certificate verification r=jschanck
Based on a patch authored by R. Martinho Fernandes <bugs@rmf.io>.

Differential Revision: https://phabricator.services.mozilla.com/D116505
2021-12-10 21:14:23 +00:00
R. Martinho Fernandes
4fa1dee9c4 Bug 1713605 - Avoid NSS usage in CertVerifier::VerifySSLServerCert r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D118030
2021-09-14 18:11:05 +00:00
R. Martinho Fernandes
0909314705 Bug 1713602 - Use NSS only on the socket thread in NSSCertDBTrustDomain::IsChainValid r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D116879
2021-08-14 02:11:30 +00:00
Kershaw Chang
bba712b93d Bug 1654507 - Part2: Plumbing for echRetry, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D119403
2021-07-13 09:24:26 +00:00
Dana Keeler
ef0a88c6f2 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-12 01:12:25 +00:00
Butkovits Atila
e4394b27a2 Backed out 3 changesets (bug 1715142) for causing build bustages. CLOSED TREE
Backed out changeset 7e67994f6a65 (bug 1715142)
Backed out changeset f58d5156f332 (bug 1715142)
Backed out changeset f8a7bd4519c6 (bug 1715142)
2021-06-11 21:20:02 +03:00
Dana Keeler
f84faf1bf5 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-11 17:58:19 +00:00
Iulian Moraru
955a3ab572 Backed out 2 changesets (bug 1715142) for causing marionette failures on test_navigation.py and mochitest failures on browser_setIgnoreCertificateErrors.js. CLOSED TREE
Backed out changeset 83206685ca0b (bug 1715142)
Backed out changeset ab3060a5f69e (bug 1715142)
2021-06-11 02:45:34 +03:00
Dana Keeler
f3c620e4c3 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-10 22:13:32 +00:00
Dana Keeler
81b6f5967b Bug 1714263 - remove expired CRLITE_RESULT telemetry histogram r=rmf
Differential Revision: https://phabricator.services.mozilla.com/D117084
2021-06-09 22:33:12 +00:00
R. Martinho Fernandes
7ea1bcd018 Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2021-06-01 06:55:07 +00:00