Commit Graph

13492 Commits

Author SHA1 Message Date
Andreea Pavel
4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
ffxbld
ee72038b8e No bug, Automated HSTS preload list update from task BqRcopwHQbGAhBJA_2Vuzw
Summary:
No bug, Automated HPKP preload list update from task BqRcopwHQbGAhBJA_2Vuzw

No bug, Automated blocklist update from task BqRcopwHQbGAhBJA_2Vuzw

No bug, Automated remote settings update from task BqRcopwHQbGAhBJA_2Vuzw

Reviewers: mtabara, jlund

Reviewed By: mtabara

Differential Revision: https://phabricator.services.mozilla.com/D1473

--HG--
extra : rebase_source : 8326a0602e40d57f8fb3da5dd047a5b3840bc77f
2018-06-01 15:56:55 +01:00
Franziskus Kiefer
51cc7e1f8e Bug 1460617 - land NSS 8232a58332dd UPGRADE_NSS_RELEASE, r=me
--HG--
extra : rebase_source : a35fb046aab40741eefdb1361e5b323bfa0bc607
2018-06-01 09:44:01 +02:00
Emilio Cobos Álvarez
fffb25b74f 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
Andreea Pavel
38bcf897f1 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-31 13:04:21 +03:00
arthur.iakab
f1046ac67f Merge mozilla-central to inbound 2018-05-31 01:08:35 +03:00
Andrea Marchesini
1273dc5391 Bug 1446933 - Remove 'using namespace mozilla::net' from BackgroundUtils.h, r=qdot 2018-05-30 21:21:17 +02:00
David Keeler
b0ca052e73 bug 1465258 - remove load group workaround in new OCSP code r=jcj
The patch for bug 1456489 included a workaround for the issue that origin
attributes weren't honored on channels that didn't have a load group set (bug
1456742). Now that that's fixed, we don't need the workaround.

MozReview-Commit-ID: I4ExIqt6dYo

--HG--
extra : rebase_source : d323c0860989985b72933dcffd62743b9d73644d
2018-05-29 16:03:37 -07:00
David Keeler
6031c1d1be bug 1464505 - remove some unused localization helpers from nsNSSComponent r=fkiefer
nsNSSComponent::PIPBundleFormatStringFromName and ::GetNSSBundleString are now
unused. They can be removed (which means that nsNSSComponent::mNSSErrorsBundle
can be removed as well).

MozReview-Commit-ID: GAaGawSDL2n

--HG--
extra : rebase_source : 3f683a902e292c6b0cf736773e71fb893074c32b
2018-05-25 13:02:02 -07:00
David Keeler
4483c4670c bug 1464510 - test_ssl_status.js needs to be run sequentially (it uses hardcoded ports) r=mgoodwin
MozReview-Commit-ID: 7MeWq9ZCRd9

--HG--
extra : rebase_source : 421aa6246d71b3ea24f835769c8af61c7658fd02
2018-05-25 13:54:43 -07:00
David Keeler
571854a7c1 bug 1464520 - hard-code the builtin roots module name to avoid a dependency on l10n in nsNSSComponent r=fkiefer,jcj
nsNSSComponent startup and shutdown would be simpler if there were no direct
dependencies on localized strings. This patch removes a dependency on the
localized name of the builtin roots module by hard-coding the name internally
and then mapping it to/from the localized version as appropriate.

MozReview-Commit-ID: 30kbpWFYbzm

--HG--
extra : rebase_source : 3d384af5a9fa45d5ac1f78e1fcb0dd9e4b94267d
2018-05-25 11:22:48 -07:00
Haik Aftandilian
0dfa17d31a Bug 1463353 - contentSandboxRules does not explcitly list 'com.apple.fonts' mach service. r=Alex_Gaynor
Add font servers to sandbox policies instead of relying
on them to be registered before the sandbox is enabled.

MozReview-Commit-ID: IoVJhAqoEEW

--HG--
extra : rebase_source : 448cc9e556056c44cf76f79c126fbfe56e948e1e
2018-05-29 14:55:12 -07:00
Franziskus Kiefer
7eaf562442 Bug 1460617 - land NSS 3d3e34bb7517 UPGRADE_NSS_RELEASE, r=me
--HG--
extra : rebase_source : 45b9c45b31b55dc1f5fcc043336b2ddc386f740c
extra : histedit_source : 221357b0e59b2a82786cc83d6b980062ec2b7ce9
2018-05-28 15:45:28 +02:00
Brindusan Cristian
309ff0bd1f Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-25 03:08:34 +03:00
David Keeler
d0f63cd6ba bug 1463901 - re-arrange some nsNSSComponent initialization/shutdown operations to avoid hanging r=jcj
Before this patch, if nsNSSComponent initialization failed after allocating the
XPCOM object for the component but before dispatching the load loadable roots
task, BlockUntilLoadableRootsLoaded would block indefinitely in ShutdownNSS
(called from ~nsNSSComponent).

This patch re-arranges some things so that nsNSSComponent cleanup won't block on
the load loadable roots task if it never fired. It also splits the cleanup into
idempotent operations and operations that can only be run once.

Unfortunately if nsNSSComponent initialization fails, Firefox is likely to exit
or fail promptly anyway (since it is essential to so many other components).
However, quitting outright is probably a better experience than hanging
indefinitely.

MozReview-Commit-ID: RWmBUV2pEU

--HG--
extra : rebase_source : e2d06178ecc8ca8681eef18cb3af0a9ac8f83d1c
2018-05-23 15:39:38 -07:00
Haik Aftandilian
fcb3b190fe Bug 1432567 - [Mac] Add a test that renders fonts from non-standard directories r=jfkthame
Adds a test to validate that content sandboxing is allowing content
processes to access fonts from non-standard locations on the
filesystem. The test copies the Fira Sans font to the root of the
home directory and renders a page that should use Fira Sans when it
is installed and registered with the OS. The test checks for the use
of the ".LastResort" font which is an indication of the the content
process failing to load the font.

MozReview-Commit-ID: GPWqHdF3vhG

--HG--
extra : rebase_source : c0ea283d496517812202d068c610bdcc0ece640d
2018-05-22 12:31:03 -07:00
David Keeler
ca855468dd bug 1461037 - lossily convert invalid UTF8 in certificates for display purposes r=jcj
In debug builds, we assert if any UTF8-to-UTF16 conversion fails. If we have
invalid UTF8 in a certificate, we don't want to assert. So, we now lossily
convert invalid UTF8 in certificates for any display purposes.
This also handles fields that are supposed to be ASCII in a similar way.

MozReview-Commit-ID: 6TdVPDTmNlh

--HG--
extra : rebase_source : 17000bd0671551bbdae534a4eaf4946c1b0beb83
2018-05-15 16:41:46 -07:00
J.C. Jones
45e31a5ac7 Bug 1460617 - land NSS 328d235fc7ee UPGRADE_NSS_RELEASE, r=me
--HG--
extra : rebase_source : 0a6e32201241c835e3ea05b2c7290d5a0fc811dd
2018-05-24 08:08:55 -07:00
Csoregi Natalia
2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
David Keeler
0dec465e26 bug 1465933 - remove GetPIPNSSBundleString from nsINSSComponent r=fkiefer
At this point, all uses of GetPIPNSSBundleString *should* be on the main thread,
so we can just remove the nsINSSComponent version and rely on the
nsNSSCertHelper instance.

MozReview-Commit-ID: Lt7AgokGKRH

--HG--
extra : rebase_source : 95d3cf6e011468e2aa9df9bb69372ac4d3430286
2018-05-31 12:26:04 -07:00
Jed Davis
2788528721 Bug 1462640 - Allow content processes to mincore() individual pages. r=gcp
MozReview-Commit-ID: IclghYFyMPp

--HG--
extra : rebase_source : 5096ced288cfd120a6d28c87a7528851617a70e9
2018-05-18 17:36:47 -06:00
J.C. Jones
4c5afa060e Bug 1460617 - land NSS c8ee333b84a0 UPGRADE_NSS_RELEASE, r=me
--HG--
extra : rebase_source : 6324109576a15237b4d629c75109a49fe2274f5f
2018-05-21 08:33:12 -07:00
Tom Ritter
9800e813cf Bug 1462100 Add the 'cast to void*' MinGW sandbox patch to the chromium patchlist r=bobowen
MozReview-Commit-ID: 457xxFsnjTL

--HG--
extra : rebase_source : c1cb170c13cc408a4c1562e5bfd001bb9597a54c
2018-05-17 10:10:50 -05:00
Tom Ritter
e8c4e33bea Bug 1462100 Cast to void* to avoid conversion errors on MinGW, which does not do the automatic conversion like msvc r=bobowen
MozReview-Commit-ID: 8fO9Nu9gaxh

--HG--
extra : rebase_source : 896c58b8050304c6a47dcbd9f7744923a721fa69
2018-05-16 14:18:20 -05:00
David Keeler
d8f748b996 bug 401240 - part 2/2 - reimplement PKCS#12 import/export without goto r=fkiefer
MozReview-Commit-ID: JUMmTPrEYND

--HG--
rename : security/manager/ssl/tests/unit/test_certDB_import_with_master_password.js => security/manager/ssl/tests/unit/test_certDB_export_pkcs12.js
rename : security/manager/ssl/tests/unit/test_certDB_import_with_master_password.js => security/manager/ssl/tests/unit/test_certDB_export_pkcs12_with_master_password.js
extra : rebase_source : 3bf01e722f496b4dba634ed5d0345ce1fe0ceea7
2018-05-11 11:37:50 -07:00
David Keeler
18117a994a bug 401240 - part 1/2 - run ./mach clang-format on nsPKCS12Blob r=fkiefer
MozReview-Commit-ID: 81m6dxhg8Pv

--HG--
extra : rebase_source : c9d3bed637e163cc6347f6626067aaf9b773db8c
2018-05-11 11:09:00 -07:00
Tom Ritter
af3c5e06a6 Bug 1460882 Disable SANDBOX_EXPORTS for the MinGW Build r=bobowen
MozReview-Commit-ID: 2muTxIYUx6F

--HG--
extra : rebase_source : c61e7de55319fd5eb156dd3c46ed4a8efe6dc42b
2018-05-11 08:16:13 -05:00
Haik Aftandilian
5e0cbf519a Bug 1460917 - Fonts not displaying with FontExplorer X fonts in Firefox 60 r=handyman
Add back font whitelist rules removed by the fix for bug 1393259
to workaround font sandbox extensions not being issued automatically
on OS X 10.11 and earlier.

MozReview-Commit-ID: 2hT0BzN3Ggq

--HG--
extra : rebase_source : 4fe9ce43eb7efe0c6a91c908c149126da6eb708e
2018-05-14 16:04:55 -07:00
J.C. Jones
0843035f6b Bug 1460617 - land NSS 6e4b0141df2f UPGRADE_NSS_RELEASE, r=me
--HG--
extra : rebase_source : c82ceabece6bd1c9b0d079a0a69eedeba4214c5e
2018-05-14 14:47:52 -07:00
Nika Layzell
2d188849ae Bug 1455217 - Part 3: Use the new xpidl Promise type instead of nsISupports, r=bz 2018-05-14 17:55:54 -04:00
J.C. Jones
db950df22f Bug 1461373 - Set BRNameMatchingPolicy to "Enforce" for Nightly r=keeler
Summary:
Change the security.pki.name_matching_mode pref to 3 for Enforce on Nightly.

BR_9_2_1_SUBJECT_ALT_NAMES show that ~99.98% of encountered certificates have
an acceptable SAN, so our compatibility risk is about 0.02%.

BR_9_2_2_SUBJECT_COMMON_NAME also shows, 99.89% of certificate common names are
present in a subject alternative name extension, giving a worst-case of 0.11%
risk, though BR_9_2_1_SUBJECT_ALT_NAMES is more what we're affecting here.

Test Plan: none

Reviewers: keeler

Tags: #secure-revision

Bug #: 1461373

Differential Revision: https://phabricator.services.mozilla.com/D1277

--HG--
extra : transplant_source : %BF%7D%DEi%C7%9BhE%D0%C2d%9D0%AC%F8%9EM%E0%60U
2018-05-14 09:55:15 -07:00
Kris Maglione
250e7028e3 Bug 1385057: Remove most code for handling unpacked side-loaded extensions. r=aswan,keeler
MozReview-Commit-ID: H4cSRBws4Ml

--HG--
extra : rebase_source : ddddef92344b6414ae4e5635b9841fcc274dfca9
2018-05-09 16:04:04 -07:00
Margareta Eliza Balazs
4f9a2ba08e Merge inbound to mozilla-central. a=merge 2018-05-11 12:36:02 +03:00
J.C. Jones
08d83d7258 Bug 1441914 - Fix Windows build on a CLOSED TREE r=me
Don't use MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS; it's unneeded here right now,
and occludes "PSM::Result" on Windows.

--HG--
extra : transplant_source : %B9%24%7FR%A8%1B%B0%3B%D44%ED%C5%3F%CD%1E%96%1F%22m%A3
2018-05-10 17:15:22 -07:00
J.C. Jones
4139925b80 Bug 1441914 - Make security.pki.distrust_ca_policy a bitmask r=fkiefer r=keeler
Per Bug 1437754 comment 10, the pref security.pki.distrust_ca_policy makes more
sense as a bitmask than a state. To permit future nuance, let's go ahead and do
that before people start implementing atop Bug 1456112.

This does permit both 0b10 and 0b11 to enable the functionality for Firefox 63.

--HG--
extra : transplant_source : %84%AF%89%E0%89dT%01%10%84%A0%3B%A5%28%2A%D3%E1%B0%0D%E7
2018-05-07 15:46:22 -07:00
David Keeler
6499399d3c bug 1427248 - avoid changing certificate trust in nsNSSComponent initialization r=fkiefer,jcj
If a user has set a master password on their NSS DB(s), when we try to change
the trust of a certificate, we may have to authenticate to the DB. This involves
bringing up a dialog box, executing javascript, spinning the event loop, etc.
In some cases (particularly when antivirus software has injected code into
Firefox), this can cause the nsNSSComponent to be initialized if it hasn't
already been. So, it's a really, really bad idea to attempt to change the trust
of a certificate while we're initializing nsNSSComponent, because this results
in a recursive component dependency and everything breaks. To get around this,
if we need to load 3rd party roots (e.g. enterprise roots or the family safety
root), we defer any trust changes to a later event loop tick. In theory this
could cause verification failures early in startup. We'll have to see if this
is an issue in practice.

MozReview-Commit-ID: FvjHP5dTmpP

--HG--
extra : rebase_source : 73d39788ce39adcbe01c89867061f64d05a3876b
2018-05-07 17:05:30 -07:00
Coroiu Cristina
683720f5ee Backed out changeset 0693ec09dd68 (bug 1427248) for bustage at build/src/security/manager/ssl/nsNSSComponent.cpp on a CLOSED TREE 2018-05-10 23:32:46 +03:00
David Keeler
65635d2855 bug 1427248 - avoid changing certificate trust in nsNSSComponent initialization r=fkiefer,jcj
If a user has set a master password on their NSS DB(s), when we try to change
the trust of a certificate, we may have to authenticate to the DB. This involves
bringing up a dialog box, executing javascript, spinning the event loop, etc.
In some cases (particularly when antivirus software has injected code into
Firefox), this can cause the nsNSSComponent to be initialized if it hasn't
already been. So, it's a really, really bad idea to attempt to change the trust
of a certificate while we're initializing nsNSSComponent, because this results
in a recursive component dependency and everything breaks. To get around this,
if we need to load 3rd party roots (e.g. enterprise roots or the family safety
root), we defer any trust changes to a later event loop tick. In theory this
could cause verification failures early in startup. We'll have to see if this
is an issue in practice.

MozReview-Commit-ID: FvjHP5dTmpP

--HG--
extra : rebase_source : ad0fb83a0de3632e3a967e91aec3d8070b22dedc
2018-05-07 17:05:30 -07:00
ffxbld
7c7bbfe6e0 No bug, Automated HSTS preload list update from task XSqPd8faStCdsylVmzvQ6w
Summary:
No bug, Automated HPKP preload list update from task XSqPd8faStCdsylVmzvQ6w

No bug, Automated blocklist update from task XSqPd8faStCdsylVmzvQ6w

Reviewers: sfraser, aki

Reviewed By: sfraser

Differential Revision: https://phabricator.services.mozilla.com/D1256

--HG--
extra : rebase_source : 855e19990c75e2613bd311976297fb6513e02b94
2018-05-10 12:14:28 +01:00
Csoregi Natalia
f034c0ab5d Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-10 12:52:31 +03:00
David Keeler
3b971d708e bug 1460312 - cancel the timeout timer in OCSP request implementation r=jcj
Bug 1456489 cleaned up our OCSP request implementation a bit. One simplification
it made was to not cancel the timeout timer. It turns out that if we don't, the
OCSPRequest that constitutes the timeout callback's closure might not be valid
if the request has completed (because the timer doesn't own a strong reference
to it). The fix is simple: cancel the timer when the request completes. Note
that we don't have to do the reverse because necko has a strong reference to the
request.

MozReview-Commit-ID: 2WHFLAcGBAw

--HG--
extra : rebase_source : c4216f6792c1d62cbd046b1b3802226c51fbe8af
2018-05-09 10:06:49 -07:00
David Keeler
e218ab3e3b bug 1460350 - re-land bug 1415991 (remove support for verifying signed unpacked add-ons) r=kmag
(Backed out changeset 6bbf8dc0b86e (which was a backout of changeset 0a5795108e0a))

MozReview-Commit-ID: EZFn7dLBcdh

--HG--
extra : rebase_source : 8fac1e33a7f108a248ecde35779b2c63ce7d9172
2018-05-09 10:19:37 -07:00
Kris Maglione
01c298aca6 Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs
Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU

--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
2018-05-08 18:36:22 -07:00
David Keeler
6ea4fb08d4 bug 1456489 - prevent making OCSP requests on the main thread r=fkiefer,jcj
OCSP requests cannot be performed on the main thread. If we were to wait for a
response from the network, we would be blocking the main thread for an
unnaceptably long time. If we were to spin the event loop while waiting (which
is what we do currently), other parts of the code that assume this will never
happen (which is essentially all of them) can break.

As of bug 867473, no certificate verification happens on the main thread, so no
OCSP requests happen on the main thread. Given this, we can go ahead and
prohibit such requests.

Incidentally, this gives us an opportunity to improve the current OCSP
implementation, which has a few drawbacks (the largest of which is that it's
unclear that its ownership model is implemented correctly).

This also removes OCSP GET support. Due to recent OCSP server implementations
(namely, the ability to cache OCSP POST request responses), OCSP GET is not a
compelling technology to pursue. Furthermore, continued support presents a
maintenance burden.

MozReview-Commit-ID: 4ACDY09nCBA

--HG--
extra : rebase_source : 072564adf1836720e147b8250afca7cebe4dbf62
2018-04-23 18:09:35 +02:00
David Keeler
6da3ace3da bug 686149 - improve PKCS7 certificate export to not use legacy path building r=fkiefer
MozReview-Commit-ID: 2U4J8uUlvaN

--HG--
extra : rebase_source : c416a552e31a6ef38a5d394374e212f00210b334
2018-05-02 10:22:58 -07:00
arthur.iakab
f2042a4c1f Merge inbound to mozilla-central a=merge 2018-05-08 15:42:06 +03:00
J.C. Jones
8d99d56270 Bug 1456112 - Add a pref to implement the last Symantec Distrust step r=keeler
This adds another preference (DistrustSymantecRootsRegardlessOfDate == 2) that
stops permitting certificates issued after 1 June 2016, and updates the test to
check it.

--HG--
extra : transplant_source : %F1%DE%16m%F2%DD%A8Ei%EF%B4%CAo%BF%8D%A6%A6%5E%D4%89
2018-05-04 09:34:45 -07:00
J.C. Jones
0fe289986b Bug 1445731 - land NSS NSS_3_37_RTM UPGRADE_NSS_RELEASE, r=me
--HG--
extra : rebase_source : 0c5dbfbfab874158345a4fe2237dc898655f0052
2018-05-04 10:42:48 -07:00
David Keeler
999c7366ef bug 1346297 - remove expired family safety telemetry probe r=jcj
MozReview-Commit-ID: BCc5Fa9jWJ2

--HG--
extra : rebase_source : fa965818e96fae6f2c23d33c9bcf6cb224b7935b
extra : amend_source : a1c08417b0a5f3b8de4c5b2025c559111e6597c2
2018-05-03 12:44:14 -07:00