Commit Graph

283 Commits

Author SHA1 Message Date
Simon Giesecke
1cd5c68592 Bug 1652002 - Remove some unnecessary includes from BindingUtils.h. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83098
2020-07-15 15:34:49 +00:00
tkhan
75ea54bf01 Bug 1650919 - Adding manifest annotations for xorigin test harness. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82763
2020-07-13 20:34:46 +00:00
Bogdan Tara
6faddf7d8f Backed out changeset 1a0f002865d3 (bug 1650919) for test_deprecated.html failures CLOSED TREE 2020-07-13 19:22:21 +03:00
tkhan
e50031dfc7 Bug 1650919 - Adding manifest annotations for xorigin test harness. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82763
2020-07-13 13:01:43 +00:00
R. Martinho Fernandes
fb3abbefc6 Bug 1270634 - check usages when generating WebCrypto keys r=keeler,jcj
Differential Revision: https://phabricator.services.mozilla.com/D81146
2020-07-08 16:32:19 +00:00
R. Martinho Fernandes
c27996d699 Bug 1286059 - throw correct error when encrypting with a bad AES-GCM tag length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D81144
2020-07-08 09:25:08 +00:00
R. Martinho Fernandes
67fb5b6119 Bug 1286880 - add test to ensure deriveBits and deriveKey throw the correct errors given invalid length arguments r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D80010
2020-07-08 09:25:06 +00:00
R. Martinho Fernandes
2c531eb20a Bug 1286878 - Add test to ensure deriveBits throws the right error when given an invalid hash name r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D80009
2020-07-08 09:24:06 +00:00
R. Martinho Fernandes
393a11c9f9 Bug 1270599 - add test to ensure generateKey returns the correct error given an invalid algorithm argument r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D80008
2020-07-08 09:23:51 +00:00
R. Martinho Fernandes
6636ae8e72 Bug 1286250 - return correct error code for bad AES key length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D79455
2020-07-08 09:23:44 +00:00
Razvan Maries
d3c3f47e4f Backed out 6 changesets (bug 1286059, bug 1270599, bug 1286250, bug 1286880, bug 1270634, bug 1286878) for multiple perma failures. CLOSED TREE
Backed out changeset 888968797a46 (bug 1270634)
Backed out changeset 73f73d6d927f (bug 1286059)
Backed out changeset de7c4515c92e (bug 1286880)
Backed out changeset a5fe48949cec (bug 1286878)
Backed out changeset 2ae604119d7b (bug 1270599)
Backed out changeset 68692026dcb1 (bug 1286250)
2020-07-06 21:20:23 +03:00
R. Martinho Fernandes
13a3b3527f Bug 1270634 - check usages when generating WebCrypto keys r=keeler,jcj
Differential Revision: https://phabricator.services.mozilla.com/D81146
2020-07-06 16:46:51 +00:00
R. Martinho Fernandes
674dd4c80f Bug 1286059 - throw correct error when encrypting with a bad AES-GCM tag length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D81144
2020-07-06 16:43:54 +00:00
R. Martinho Fernandes
8ec8f43e46 Bug 1286880 - add test to ensure deriveBits and deriveKey throw the correct errors given invalid length arguments r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D80010
2020-07-06 16:43:41 +00:00
R. Martinho Fernandes
f1a544dd2d Bug 1286878 - Add test to ensure deriveBits throws the right error when given an invalid hash name r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D80009
2020-07-06 16:43:28 +00:00
R. Martinho Fernandes
0b0d3c3672 Bug 1270599 - add test to ensure generateKey returns the correct error given an invalid algorithm argument r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D80008
2020-07-06 16:43:21 +00:00
R. Martinho Fernandes
c8ef1c44cb Bug 1286250 - return correct error code for bad AES key length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D79455
2020-07-06 16:43:01 +00:00
Simon Giesecke
e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Jean-Yves Avenard
87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Noemi Erli
78e02beda2 Backed out changeset a5db7fb321d5 (bug 1286250) for causing failures in failures_AES-CTR.https.any.html 2020-06-17 16:00:21 +03:00
R. Martinho Fernandes
9af790a9cf Bug 1286250 - return correct error code for bad AES key length r=keeler
I found out there were already existing tests for this, so I changed them to no longer expect failure.

Differential Revision: https://phabricator.services.mozilla.com/D79455
2020-06-17 08:19:33 +00:00
Brindusan Cristian
692fccc5dd Backed out changeset 99ea9e6229cb (bug 1286250) for wpt failures at AES-CBC.https.any.html. CLOSED TREE 2020-06-13 00:57:51 +03:00
R. Martinho Fernandes
96975d5c9b Bug 1286250 - return correct error code for bad AES key length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D79455
2020-06-12 20:25:35 +00:00
Simon Giesecke
09520b5285 Bug 1628692 - Prepare dom/crypto for making FallibleTArray uncopyable. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D72619
2020-04-29 17:24:13 +00:00
Kris Maglione
4c89b71494 Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.

Differential Revision: https://phabricator.services.mozilla.com/D70745
2020-04-20 22:31:29 +00:00
Ciure Andrei
a5ac2a8bbc Backed out 10 changesets (bug 1614462) for causing test_ipc_messagemanager_blob.js failures CLOSED TREE
Backed out changeset bf4f8253c708 (bug 1614462)
Backed out changeset c61b797d63e9 (bug 1614462)
Backed out changeset 284002de7137 (bug 1614462)
Backed out changeset 7f604ee5731c (bug 1614462)
Backed out changeset a73ef8167cd4 (bug 1614462)
Backed out changeset ecc3477ed34e (bug 1614462)
Backed out changeset 2106f3ccc4b5 (bug 1614462)
Backed out changeset e68c38a7741d (bug 1614462)
Backed out changeset 93b3bacdbb34 (bug 1614462)
Backed out changeset 0cf4898ae08d (bug 1614462)
2020-04-21 01:11:37 +03:00
Kris Maglione
d1639bbfcd Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.

Differential Revision: https://phabricator.services.mozilla.com/D70745
2020-04-20 20:11:43 +00:00
Ciure Andrei
c15dcac93b Backed out 10 changesets (bug 1614462) for causing xpcshell failures CLOSED TREE
Backed out changeset 34d4a86530b4 (bug 1614462)
Backed out changeset dbc2e2556d08 (bug 1614462)
Backed out changeset 512bbab4730c (bug 1614462)
Backed out changeset cd6b8d630f4c (bug 1614462)
Backed out changeset e4ad5037658f (bug 1614462)
Backed out changeset 0ffed1dc4296 (bug 1614462)
Backed out changeset 90ed81cbfe34 (bug 1614462)
Backed out changeset 6d2137eb1d52 (bug 1614462)
Backed out changeset b4819c99e16e (bug 1614462)
Backed out changeset b7deaed376ed (bug 1614462)
2020-04-17 02:26:14 +03:00
Kris Maglione
c45d02801c Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.

Differential Revision: https://phabricator.services.mozilla.com/D70745
2020-04-16 16:57:14 +00:00
Kevin Jacobs
2a981b96ab Bug 1624128 - Update CK_GCM_PARAMS uses for PKCS11 v3.0 definition r=keeler
This patch initializes the ulIvBits member of CK_GCM_PARAMS, which is new in PKCS11 v3.

For libprio, we instead define NSS_PKCS11_2_0_COMPAT, which yields the old struct definition.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 18:32:19 +00:00
Kevin Jacobs
042e191487 Bug 1624128 - Backed out changeset 3ed30e6b6de1 - Updating Fx76 to NSS 3.51.1 r=keeler
Revert setting CK_GCM_PARAMS ulIvBits, as this field won't exist until NSS 3.52.

Depends on D68665

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

--HG--
extra : moz-landing-system : lando
2020-03-30 21:12:45 +00:00
Kevin Jacobs
00c927efc6 Bug 1624128 - Update CK_GCM_PARAMS uses for PKCS11 v3.0 definition r=keeler
This patch initializes the ulIvBits member of CK_GCM_PARAMS, which is new in PKCS11 v3.

For libprio, we instead define NSS_PKCS11_2_0_COMPAT, which yields the old struct definition.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 16:41:27 +00:00
Mark Banner
15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Simon Giesecke
a8e5e0222e Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/crypto. r=smaug
Depends on D62572

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

--HG--
extra : moz-landing-system : lando
2020-02-12 13:25:38 +00:00
J.C. Jones
ac5dfc4597 Bug 1333140 - Require SecureContext for WebCrypto r=bholley,keeler,baku
Adds [SecureContext] for crypto.subtle, CryptoKey, and SubtleCrypto, retiring
the WebCrypto WPT overrides for WebCryptoAPI/historical.any.js.

Rebased on https://phabricator.services.mozilla.com/D58743

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

--HG--
extra : moz-landing-system : lando
2020-02-11 09:25:09 +00:00
Edgar Chen
9e846bd48a bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514

--HG--
extra : moz-landing-system : lando
2020-01-23 03:22:06 +00:00
Tom Schuster
989660da15 Bug 1605854 - Remove uneval/toSource from DOM tests. r=smaug
Using JSON.stringify in dom/tests/mochitest/chrome/test_clonewrapper.xhtml might not be the best solution, because
the testObject contains ImageData objects.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 13:09:27 +00:00
Nathan Froyd
f37a5156c3 Bug 1596547 - be more specific in CryptoBuffer::Assign parameter types; r=jcj
We don't need the full generality of templated typed arrays here, just
the ability to assign from `Uint8Array`.  Some versions of clang in
C++17 mode have problems with overload resolution when faced with
templated method parameters that resolve to base classes of the passed
arguments.  Using the more-specific type here avoids those bugs.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 13:12:58 +00:00
J.C. Jones
529346ab71 Bug 1410403 - Use id-ecPublicKey for ECDH key export from WebCrypto r=keeler
id-ecPublicKey is defined as the OID {iso(1) member-body(2) us(840)
ansi-x962(10045) keyType(2) ecPublicKey(1)}, and is the NSS default, so
remove the override code from CryptoKey.cpp that forced it to the legacy
id-ecDH code.

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

--HG--
extra : moz-landing-system : lando
2019-11-11 21:25:40 +00:00
J.C. Jones
9c614370ec Bug 1564509 - Remove DH from WebCrypto r=kjacobs,bzbarsky,keeler
Bug 1034856 added support for DH algorithms to WebCrypto, however the final
specification did not choose to include them, making Firefox the only browser
with support.

Bug 1539578 added telemetry to show usage, and it is extremely low (not
appearing on the graphs), which could be expected as Firefox is the only
supporting browser.

Since DH is an ongoing maintenance burden -- and overall cryptanalysis of DH
is progressing -- let's remove it.

Notice to unship went to dev-platform on 29 March 2019 with no objections. [0]

[0] https://groups.google.com/d/msg/mozilla.dev.platform/Ut3-eQmUdWg/O9w1et1aBgAJ

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

--HG--
extra : moz-landing-system : lando
2019-11-11 21:17:47 +00:00
Nathan Froyd
f64f04d6ef Bug 1593803 - rename NS_DispatchToBackgroundThread to NS_DispatchBackgroundTask; r=KrisWright
The current API name is bad: we want it to be read "some background
thread", but it could just as easily be read "a singular background
thread", which would lead people to assume that for:

```
NS_DispatchToBackgroundThread(...);
NS_DispatchToBackgroundThread(...);
```

the dispatched tasks will necessarily run in the order they are
dispatched, which is not the case.

Let's try to head off that interpretation by renaming this function.

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

--HG--
extra : moz-landing-system : lando
2019-11-05 21:19:18 +00:00
Geoff Brown
c906073cd5 Bug 1585119 - Re-enable many mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
With the additional tests running, task times increase; I have added one
more test chunk for android mochitest-plain.
These tests were identified from a random sampling of mochitest manifests;
I intend to enable more mochitests in future patches.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 15:07:09 +00:00
Nathan Froyd
c272af49a0 Bug 1583646 - make WebCryptoTask dispatch tasks to our background thread; r=keeler,jcj
Since background threads get shut down near `xpcom-shutdown-threads`,
there's no need to have `WebCryptoThreadPool` anymore; we can rely on
the background thread dispatching to fail to dispatch our task as
appropriate.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 20:47:31 +00:00
Henri Sivonen
c193518677 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:34 +00:00
Barret Rennie
1e6227239a Bug 1289211 - Rename InfallibleTArray to nsTArray in dom/crypto/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D36943

--HG--
extra : moz-landing-system : lando
2019-07-10 03:25:56 +00:00
Victor Porof
9bb757c75b Bug 1561435 - Fix linting errors for dom/, r=standard8
# ignore-this-changeset

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

--HG--
extra : source : 0d32f3d8e36ac595589c178339237b88dac55df9
extra : intermediate-source : 5db227e1922c88ab0e3efc67ffbad22da1471c6f
2019-06-28 20:53:14 +02:00
Victor Porof
0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Boris Zbarsky
4b183f77b2 Bug 1350254 part 8. Switch CryptoKey to [Serializable]. r=baku
The spec doesn't say to do this, but I think we should.  See
https://github.com/w3c/webcrypto/issues/222

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

--HG--
extra : moz-landing-system : lando
2019-06-25 06:48:41 +00:00
Boris Zbarsky
a136313b5e Bug 1350254 part 7. Consolidate ReadString/WriteString helpers for structured serialization. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D35721

--HG--
extra : moz-landing-system : lando
2019-06-25 06:48:33 +00:00
Brian Grinstead
0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00