Commit graph

163 commits

Author SHA1 Message Date
Anna Weine
33701c7ba8 Bug 1894027 - Replacing SyntaxError exception with TypeError for derive_bits_keys r=nss-reviewers,jschanck
Differential Revision: https://phabricator.services.mozilla.com/D208914
2024-05-06 08:44:10 +00:00
Nuohan Li
6d94b98e3a Bug 1894306 - WebCrypto web platform tests failure due to wrong return value r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D209042
2024-05-01 16:31:33 +00:00
Dana Keeler
13f89314a5 Bug 1864056 - web crypto: check for empty usages when importing private keys r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D193251
2023-11-14 22:46:13 +00:00
Dana Keeler
846855470a Bug 1851928 - webcrypto: use the entire output of ECDH key derivation when the target algorithm doesn't specify a length r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D187728
2023-09-11 21:04:32 +00:00
Dana Keeler
3f1e9283ca Bug 1813424 - webcrypto: check decoded key type before using r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D168472
2023-01-31 23:49:06 +00:00
Melvin Low
803af10dea Bug 1563236 - Add AES-KW purposed keys to list of allowable keys to unwrap. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D159728
2022-10-20 21:03:29 +00:00
Carter Sellgren
db93b28c57 Bug 1285986 - [Web Crypto] Changed error when AES-CBC, AES-CTR has wrong iv length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D158540
2022-10-13 19:13:48 +00:00
Cristian Tuns
d531f63b7c Backed out changeset dc1d2b9d698b (bug 1285986) for causing wpt failures on aes_cbc.https.any.worker.html CLOSED TREE 2022-10-12 18:09:04 -04:00
Carter Sellgren
d77cb499b1 Bug 1285986 - [Web Crypto] Changed error when AES-CBC, AES-CTR has wrong iv length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D158540
2022-10-12 17:38:37 +00:00
Kagami Sascha Rosylight
6abe98f452 Bug 1769290 - Part 8: Apply mozilla-js-handle-rooted-typedef against dom/canvas,crypto,fetch,gamepad,geolocation,indexedDB,ipc r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148281
2022-06-05 20:54:59 +00:00
Emilio Cobos Álvarez
2b25e0298a Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 19:06:51 +00:00
R. Martinho Fernandes
f8f4abb939 Bug 1723826 - Check for integer overflow with key length r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D129850
2021-11-26 08:57:21 +00:00
Christoph Walcher
ac5901af5c Bug 1133698 - Implement PKCS8 import/export of ECDSA keys for WebCrypto API. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D97857
2021-08-09 18:59:02 +00:00
Christoph Walcher
0a52b7c0ad Bug 1410861 - Support for unwrapKey of ECDH/ECDSA keys r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D97711
2021-02-22 22:15:57 +00:00
Brindusan Cristian
a0e7c4933a Backed out changeset e2521231284c (bug 1410861) for wpt failures in test_wrapKey_unwrapKey.https.html. CLOSED TREE 2021-02-17 23:55:47 +02:00
Christoph Walcher
614f13126a Bug 1410861 - Support for unwrapKey of ECDH/ECDSA keys r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D97711
2021-02-17 21:07:32 +00:00
Sylvestre Ledru
fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila
964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru
5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +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
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
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
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
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
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
J.C. Jones
47b914e9b8 Bug 1539578 - Add telemetry for DH use in WebCrypto API r=keeler
Our WebCrypto implementation supports using DH as an algorithm in generateKey,
which is not one of the recognized algorithms in the published specification [0].

We should seek to remove it from Firefox, but before we do, it'd be good to
gather some telemetry on whether it's used at all, even in its' non-standard
form.

[0] https://www.w3.org/TR/WebCryptoAPI/#algorithm-overview

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

--HG--
extra : moz-landing-system : lando
2019-04-02 22:25:04 +00:00
Bogdan Tara
18ad7ae673 Backed out changeset 37530e362d32 (bug 1539578) for browser_WebCrypto_telemetry.js failures CLOSED TREE 2019-04-03 00:56:53 +03:00
J.C. Jones
e0ec60e836 Bug 1539578 - Add telemetry for DH use in WebCrypto API r=keeler
Our WebCrypto implementation supports using DH as an algorithm in generateKey,
which is not one of the recognized algorithms in the published specification [0].

We should seek to remove it from Firefox, but before we do, it'd be good to
gather some telemetry on whether it's used at all, even in its' non-standard
form.

[0] https://www.w3.org/TR/WebCryptoAPI/#algorithm-overview

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

--HG--
extra : moz-landing-system : lando
2019-04-02 17:31:25 +00:00
Ciure Andrei
696c9d2139 Backed out changeset e356ebea641d (bug 1539578) for causing browser_WebCrypto_telemetry.js to perma fail CLOSED TREE 2019-03-29 21:21:33 +02:00
J.C. Jones
503d325bbb Bug 1539578 - Add telemetry for DH use in WebCrypto API r=keeler
Our WebCrypto implementation supports using DH as an algorithm in generateKey,
which is not one of the recognized algorithms in the published specification [0].

We should seek to remove it from Firefox, but before we do, it'd be good to
gather some telemetry on whether it's used at all, even in its' non-standard
form.

[0] https://www.w3.org/TR/WebCryptoAPI/#algorithm-overview

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:55:54 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jon Coppeard
6d25feaeda Bug 1500759 - Root parameter dictionaries in AesTask::Init() r=keeler a=abillings 2018-11-07 11:12:49 +00:00
Edouard Oger
2aa62daff7 Bug 1500292 p1 - Remove 0-length key checks in ImportSymmetricKeyTask and DerivePbkdfBitsTask. r=jcj
Differential Revision: https://phabricator.services.mozilla.com/D9285

--HG--
extra : moz-landing-system : lando
2018-10-23 15:43:44 +00:00
Andi-Bogdan Postelnicu
a2e49cabf3 Bug 1453795 - DOM/Crypto - Initialize member fields in classes/ structures. r=mt
--HG--
extra : rebase_source : 9ac3640ce3647da79bf2b5b94a9e10f83f400ec5
extra : amend_source : 97de314b17ce2a764ea96094f8d0ed19e9b26d9e
2018-07-11 10:37:57 +03:00
Andrea Marchesini
f1556fa2b9 Bug 1455256 - Port more components to WorkerRef - part 3 - WebCrypto, r=asuth 2018-06-18 16:37:21 -04:00