Граф коммитов

133 Коммитов

Автор SHA1 Сообщение Дата
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
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
David Keeler ad5cec4768 bug 1421084 - part 3/4 - remove nsNSSShutDownObject::shutdown and virtualDestroyNSSReference r=mt,ttaubert
MozReview-Commit-ID: ErL7ZjAGVVC

--HG--
extra : rebase_source : 2869aafaef729f0ad190f957919e8b9c40700477
2018-01-24 14:29:08 -08:00
David Keeler a0e34baf27 bug 1421084 - part 2/4 - remove nsNSSShutDownObject::isAlreadyShutDown() r=mt,ttaubert
MozReview-Commit-ID: DlS16pHE0Ik

--HG--
extra : rebase_source : d7596a3571478adefae4ffa5d446ff5234ba9ed7
2018-01-23 12:22:56 -08:00
David Keeler e8cc0ba1ce bug 1421084 - part 1/4 - remove now-unnecessary nsNSSShutDownPreventionLock r=mt,ttaubert
As of bug 1417680, the NSS shutdown tracking infrastructure is unnecessary (and
does nothing anyway). This series of changesets removes the remaining pieces in
a way that is hopefully easy to confirm is correct.

MozReview-Commit-ID: 8Y5wpsyNlGc

--HG--
extra : rebase_source : ef6b481510d949e404a4ef5615097d66e566c947
2018-01-23 10:37:47 -08:00
Andrea Marchesini a5bed23bd8 Bug 1432963 - Fixing workers headers - part 15 - static function in a workers namespace, r=smaug 2018-01-31 08:24:30 +01:00
Andrea Marchesini 2c7c69af24 Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00
Andrea Marchesini 063723a1f0 Bug 1432963 - Fixing workers headers - part 13 - WorkerHolder without workers namespace, r=smaug 2018-01-31 08:23:44 +01:00
Tim Taubert 0294a21add Bug 1413841 - Check for integer overflow in AesTask::DoCrypto() r=keeler
Summary:
After calling mResult.SetLength(mData.Length() + 16) we should check that the
integer addition didn't overflow. It seems at the moment impossible to create
ArrayBuffers of size >= 0x0xfffffff0, however adding a check here doesn't hurt.

mResult.Length() is passed to the PK11 API functions as a maxOut parameter and
/should/ be checked by the softoken crypto algorithm implementations. AES-ECB
and AES-GCM seem to do that correctly.

Reviewers: keeler

Reviewed By: keeler

Subscribers: mcote, ttaubert, jcj, keeler

Bug #: 1413841

Differential Revision: https://phabricator.services.mozilla.com/D188
2017-11-28 10:00:47 +01:00
Andrea Marchesini 73712f7d05 Bug 1405290 - Improve logging of workers when shutting down - part 3 - WorkerHolder with names, r=asuth 2017-11-15 07:58:38 +01:00
Andrea Marchesini 351d938b86 Bug 1128959 - Implement the WHATWG Streams spec - part 1 - WebIDL Bindings, r=bz 2017-08-10 18:04:54 -07:00
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Bill McCloskey aefa2aa5da Bug 1365097 - Convert NS_GetCurrentThread uses in dom (except for dom/media) (r=smaug)
For the Quatum DOM project, it's better to work in terms of event targets than
threads. This patch converts DOM code to operate on event targets rather than
threads, when possible.

MozReview-Commit-ID: 5FgvpKadUA2
2017-06-12 20:20:08 -07:00
Bill McCloskey c197e07ff2 Bug 1363560 - Name more runnables (r=mccr8)
MozReview-Commit-ID: 3hxZDA4JlTV
2017-05-09 21:53:25 -07:00
Cykesiopka 28a88f8f35 Bug 1329238 - Make public CryptoKey.h methods return UniqueX NSS types instead of raw pointers. r=ttaubert
The std::unique_ptr based UniqueX types provide better safety over managing raw
pointers.

MozReview-Commit-ID: EwwOfs6RHqy

--HG--
extra : rebase_source : 7fbfca837c09b641bfffcba854d46b3f79645c0d
2017-01-25 00:27:39 +08:00
Cykesiopka 96938ea780 Bug 1311379 - Stop using Scoped.h NSS types in WebCryptoTask.(cpp|h). r=rbarnes,ttaubert
Scoped.h is deprecated.

MozReview-Commit-ID: CAcnrB9v3dH

--HG--
extra : rebase_source : eaa0dc4348f8577f42c0577d5f9f9031d2d2bb95
2016-11-18 00:49:25 +08:00
Cykesiopka a16f7b0f6a Bug 1296316 - Convert nsNSSShutDownObject::CalledFromType to an enum class. r=mgoodwin
enum classes are in general safer than plain enums, and as such should be
preferred.

MozReview-Commit-ID: 1FK89SNhdk4

--HG--
extra : rebase_source : 764c4855026c02d8c9e33ca33637fec54ea5ca31
2016-08-20 23:00:19 +08:00
Ben Kelly 9d7b33a00b Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-18 07:11:04 -07:00
Phil Ringnalda 4083fafafc Backed out 10 changesets (bug 1290116, bug 1293690) for build bustage
CLOSED TREE

Backed out changeset bbc14d107fca (bug 1290116)
Backed out changeset a81b6ce5c25f (bug 1290116)
Backed out changeset e0b9c25b6125 (bug 1290116)
Backed out changeset 8e9a9ba04ce5 (bug 1290116)
Backed out changeset 2d5ad5e9ed20 (bug 1290116)
Backed out changeset eb7da0dbfc72 (bug 1290116)
Backed out changeset 6a4e8c92faae (bug 1290116)
Backed out changeset 0342d98afa10 (bug 1293690)
Backed out changeset d84b0768f0ce (bug 1293690)
Backed out changeset f9f62ade9508 (bug 1293690)
2016-08-17 21:16:43 -07:00
Ben Kelly fa520e1fdd Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-17 20:01:35 -07:00
Ben Kelly 9c47710e37 Bug 1281874 P1 Hold the worker alive while performing web crypto async work. r=khuey 2016-07-01 06:49:45 -07:00
Cykesiopka 18c21f386e Bug 1271495 - Replace uses of ScopedPK11Context with UniquePK11Context. r=keeler,mcmanus
ScopedPK11Context is based on Scoped.h, which is deprecated in favour of the
standardised UniquePtr.

MozReview-Commit-ID: HE8UY1hOuph

--HG--
extra : transplant_source : 4%BF%81M%09Q-%2A%E6%04%86i%18%1B%3CL%90%88%04%C7
2016-05-13 05:53:57 -07:00
David Keeler cbc656ba88 bug 1271350 - work around PK11_CreatePBEV2AlgorithmID generating a random salt when it shouldn't r=ttaubert
MozReview-Commit-ID: KHjiwPg2SBb

--HG--
extra : rebase_source : b712a557064a6b278f085bac2cbd9bbbc4591c42
2016-05-12 11:12:57 -07:00
Tim Taubert 6fa0b58615 Bug 842818 - Inline CloneData() and clean up ImportKeyTask::SetKeyData() r=rbarnes 2016-03-17 11:02:11 +01:00
Tim Taubert 3d8c7dabb0 Bug 842818 - Allow calling WebCryptoTask::DispatchWithPromise() from workers r=keeler 2016-01-20 23:19:42 +01:00
Tim Taubert 0d2f5760da Bug 1250930 - Use correct global when creating a key in GenerateAsymmetricKeyTask r=bz 2016-03-08 11:15:58 +01:00
Tim Taubert 1551754c99 Bug 1250930 - Use correct global when creating a key in GenerateSymmetricKeyTask r=bz 2016-03-08 11:15:29 +01:00
Tim Taubert 6eec770808 Bug 1250930 - Use SubtleCrypto's global when creating keys for an ImportKeyTask r=bz 2016-03-08 11:14:37 +01:00
Martin Thomson e612132ce4 Bug 1241757 - Permit export of JWK with empty key_ops field, r=rbarnes
--HG--
extra : rebase_source : 65bfd25c8c814a236028ddf611f4a0ef0beb7031
2016-01-22 18:07:39 +11:00