And apply the auto-fix from the linter. Note that we exclude RefPtr from
the check as it plays badly with our CanRunScriptChecker's linter.
We also explicitly silent warning for loops on nsTObserverArray, as their
iterator is designed to support invalidation.
Differential Revision: https://phabricator.services.mozilla.com/D293497
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
This patch renames nsITransportSecurityInfo.failedCertChain to
handshakeCertificates and makes the property always available (after the
handshake has completed, that is).
Differential Revision: https://phabricator.services.mozilla.com/D268467
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
This patch renames nsITransportSecurityInfo.failedCertChain to
handshakeCertificates and makes the property always available (after the
handshake has completed, that is).
Differential Revision: https://phabricator.services.mozilla.com/D268467
The last remaining Symantec roots affected by the distrust plan were removed in
bug 1855318 and bug 1618402, so the rest of the machinery can go as well now.
Differential Revision: https://phabricator.services.mozilla.com/D257736
This patch replaces the xpcshell script that generated CA telemetry IDs with
an implementation in python that directly reads the certdata.txt file that
provides the data for the builtin roots module.
This patch also revs the telemetry metrics cert.validation_success_by_ca,
cert_pinning.failures_by_ca, and ssl.ct_policy_non_compliant_connections_by_ca,
replacing them each with ..._by_ca_2 versions.
Additionally, this patch retires the legacy histograms previously mirrored by
the replaced metrics.
Differential Revision: https://phabricator.services.mozilla.com/D254758
SEC_ERROR_REVOKED_CERTIFICATE is a certificate error, not a TLS protocol error.
This patch updates the categorization of this error while maintaining the
property that it cannot be overridden. This has the benefit of making it
possible to show more diagnostic information in the error page, which this
patch also adds.
Differential Revision: https://phabricator.services.mozilla.com/D239220
This migrates SSL_SUCCESFUL_CERT_VALIDATION_TIME_MOZILLAPKIX,
SSL_INITIAL_FAILED_CERT_VALIDATION_TIME_MOZILLAPKIX, and
CERT_VALIDATION_HTTP_REQUEST_{CANCELED,SUCCEEDED,FAILED}_TIME to glean timing
distributions.
The certificate validation time metrics have had their precision increased from
milliseconds to microseconds.
Differential Revision: https://phabricator.services.mozilla.com/D219535
This updates the certificate transparency policy based on Chrome's policy,
found at https://googlechrome.github.io/CertificateTransparency/ct_policy.html.
Both it and the Chrome policy are similar to the Apple policy, found at
https://support.apple.com/en-us/103214.
Essentially, the policy can be satisfied in two ways, depending on the source
of the collected SCTs.
For embedded SCTs, at least one must be from a log that was Admissible
(Qualified, Usable, or ReadOnly) at the time of the check. There must be SCTs
from N distinct logs that were Admissible or Retired at the time of the check,
where N depends on the lifetime of the certificate. If the certificate lifetime
is less than or equal to 180 days, N is 2. Otherwise, N is 3. Among these SCTs,
at least two must be issued from distinct log operators.
For SCTs delivered via the TLS handshake or an OCSP response, at least two must
be from a log that was Admissible at the time of the check. Among these SCTs,
at least two must be issued from distinct log operators.
Differential Revision: https://phabricator.services.mozilla.com/D218800
This patch uses the log state information in the known CT log list to
differentiate qualified, usable, and readonly (collectively now referred to as
"admissible") logs from retired logs. This patch also takes the opportunity to
update the language in the implementation from "disqualified" to "retired" to
match the current terminology from the source data.
Differential Revision: https://phabricator.services.mozilla.com/D218266
This patch uses the log state information in the known CT log list to
differentiate qualified, usable, and readonly (collectively now referred to as
"admissible") logs from retired logs. This patch also takes the opportunity to
update the language in the implementation from "disqualified" to "retired" to
match the current terminology from the source data.
Differential Revision: https://phabricator.services.mozilla.com/D218266
This patch uses the log state information in the known CT log list to
differentiate qualified, usable, and readonly (collectively now referred to as
"admissible") logs from retired logs. This patch also takes the opportunity to
update the language in the implementation from "disqualified" to "retired" to
match the current terminology from the source data.
Differential Revision: https://phabricator.services.mozilla.com/D218266
To ensure all root CA telemetry IDs fit in the buckets allocated to each
histogram, this patch removes and replaces the following probes:
CERT_VALIDATION_SUCCESS_BY_CA
CERT_PINNING_FAILURES_BY_CA
SSL_CT_POLICY_NON_COMPLIANT_CONNECTIONS_BY_CA
with
CERT_VALIDATION_SUCCESS_BY_CA_2
CERT_PINNING_FAILURES_BY_CA_2
SSL_CT_POLICY_NON_COMPLIANT_CONNECTIONS_BY_CA_2
while re-generating CA IDs from scratch (which will now not exceed the number
of allocated buckets due to CA removals).
This takes the opportunity to remove SSL_CT_POLICY_COMPLIANT_CONNECTIONS_BY_CA
because it is essentially the difference between CERT_VALIDATION_SUCCESS_BY_CA
and SSL_CT_POLICY_NON_COMPLIANT_CONNECTIONS_BY_CA, and provides no additional
insight.
Differential Revision: https://phabricator.services.mozilla.com/D217768
Previously the PVerifySSLServerCert protocol consisted of two functions: one to
call when certificate verification succeeded, and another to call upon failure.
This was unnecessary, as the code before and after this protocol didn't have
the same split. This patch unifies the protocol to better match the surrounding
code. It also takes the opportunity to make use of some IPC helpers to
serialize enums rather than manually casting to and from basic integer types.
Differential Revision: https://phabricator.services.mozilla.com/D212594
Have idleThreadGraceTimeout and idleThreadMaximumTimeout instead of just idleThreadTimeout.
Clarify that idleThreadMaximumTimeout is only affecting allowed idle threads.
Make idle threads end only after at minimum idleThreadGraceTimeout even if they are in excess.
Remove the idleThreadTimeoutRegressive setting.
Introduce a "most recently used" priority for notifying idle threads to
avoid excessive round-robin through all available idle threads.
The management of the linked list has constant time, adding thus only
minimal overhead wrt to the previous wasIdle flags we had.
As a side effect (and coming from the investigations in bug 1891732) to
some extent this can help to improve the "logical thread affinity",
together with trying to keep events dispatched with NS_DISPATCH_AT_END
on the dispatching thread as much as possible, which should help
TaskQueue a lot with affinity.
Differential Revision: https://phabricator.services.mozilla.com/D209884