Commit Graph

324 Commits

Author SHA1 Message Date
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
Gregory Pappas
5d44f7a543 Bug 1811347 - Remove useless parameter from TextEncoder constructor r=emk,webdriver-reviewers,extension-reviewers,credential-management-reviewers,dimi,jdescottes,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D167488
2023-01-23 15:41:49 +00:00
Mark Banner
8730eec697 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +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
Olli Pettay
93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Dana Keeler
72b56f06e4 Bug 1788855 - ensure NSS is initialized in CreateECPublicKey r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D156586
2022-09-06 21:04:31 +00:00
Mark Banner
783a2f2187 Bug 1788037 - Turn on ESLint rule for prefer-boolean-length-check for dom. r=asuth,karlt
Differential Revision: https://phabricator.services.mozilla.com/D155965
2022-09-02 11:05:17 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +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
7352e67df7 Bug 1770885 - Avoid key copy + re-verification in CreateECPublicKey. r=keeler
This avoids the key copy, and should prevent further verification when
using the returned key.

Differential Revision: https://phabricator.services.mozilla.com/D147650
2022-06-02 12:13:43 +00:00
Emilio Cobos Álvarez
e69fb37b6c Bug 1770885 - Don't verify the origin-trials public key. r=smaug
This takes half the time of the signature validation process, and we
trust the key we're providing, so we shouldn't need to do this.

Plus, PK11_VerifyWithMechanism verifies the key again
(see bug 1770921).

Differential Revision: https://phabricator.services.mozilla.com/D147171
2022-06-02 09:38:57 +00:00
Kagami Sascha Rosylight
c2126ea399 Bug 1768189 - Part 8: Apply modernize-concat-nested-namespaces to dom/clients/manager/ClientHandleParent.h ... r=andi
Depends on D145741

Differential Revision: https://phabricator.services.mozilla.com/D145742
2022-05-09 20:41:06 +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
Emilio Cobos Álvarez
6ea61a050a Bug 1756500 - Implement key verification for origin trials. r=keeler,nkulatova
Somewhat straight-forward. Add a test key so that we can add some tests
for this.

Differential Revision: https://phabricator.services.mozilla.com/D139402
2022-03-08 15:24:16 +00:00
Christian Holler
e651d38a14 Bug 1749279 - Validate KeyAlgorithmType before cast. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D137022
2022-02-07 10:01:25 +00:00
Sandor Molnar
73253ebd1d Backed out changeset 98e6170edea6 (bug 1749279) for causing bp-hybrid build bustages in dom/crypto/KeyAlgorithmProxy.cpp CLOSED TREE 2022-01-31 23:08:36 +02:00
Christian Holler
0a4c9aa11a Bug 1749279 - Validate KeyAlgorithmType before cast. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D137022
2022-01-31 18:13:47 +00:00
Christian Holler
3782331a06 Bug 1590068 - Add fuzzing target for StructuredCloneData. r=baku,sfink
Differential Revision: https://phabricator.services.mozilla.com/D128513
2021-12-08 18:59:02 +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
Dana Keeler
79bcf1e75e Bug 1718899 - webcrypto: handle the 'alg' field in ECDSA JWK keys r=rmf
KeyAlgorithmProxy::JwkAlg() didn't account for ECDSA, so when
ImportKeyTask::JwkCompatible() checked the 'alg' field, if it was present and
correct, it would never match for ECDSA keys, so importing would fail.

Differential Revision: https://phabricator.services.mozilla.com/D128116
2021-10-12 20:35:07 +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
Nayeem Hasan
7d2a7165b4 Bug 1713523 - Remove 'else' after 'return' in CryptoBuffer. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D116934
2021-07-09 12:20:40 +00:00
Kagami Sascha Rosylight
a9417a719e Bug 1360715 - Part 2: Modify instanceofs in tests to non-cross-context r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106662
2021-03-04 22:03:57 +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
Kartik Gautam
f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Dorel Luca
7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam
caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Simon Giesecke
9093e5e1bf Bug 1673424 - Fix includes around JS/StructuredClone.h.
Differential Revision: https://phabricator.services.mozilla.com/D94762

Depends on D93568
2020-11-23 16:06:52 +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
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
50762dacab Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
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