aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/meta/WebCryptoAPI
Commit message (Collapse)AuthorAgeFilesLines
* Update web-platform-tests to revision ↵Servo WPT Sync2025-03-094-0/+360
| | | | | b'c23b0ad587af296087067b48a2f2101233589a8f' (#35869) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* api: Flatten and simplify Servo preferences (#34966)Martin Robinson2025-01-141-1/+1
| | | | | | | | | | | | | | | | | | | Flatten and simplify Servo's preferences code. In addition, have both preferences and options passed in as arguments to `Servo::new()` and make sure not to use the globally set preferences in `servoshell` (as much as possible now). Instead of a complex procedural macro to generate preferences, just expose a very simple derive macro that adds string based getters and setters. - All command-line parsing is moved to servoshell. - There is no longer the concept of a missing preference. - Preferences no longer have to be part of the resources bundle because they now have reasonable default values. - servoshell specific preferences are no longer part of the preferences exposed by the Servo API. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-12-058-0/+454
| | | | | b'bf49dde84c5f05613115d6146d109f0ec3900694' (#34483) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* crypto: Fix 192-bit checks for AES-GCM encrypt/decrypt (#34333)Daniel Adams2024-11-212-384/+0
| | | | | | | | | | | | | | | | | | | * Fix 192-bit key length check for AES-GCM encrypt/decrypt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations - Regenerated legacy ones as they had outdated expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missed expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* crypto: Include `key_ops` in exported JWKs, support JWK for HMAC import (#34317)Daniel Adams2024-11-212-490/+0
| | | | | | | | | | | | | | | | | * Improve JWK handling, HMAC import Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix logic in parse_jwk, properly stringify key_ops Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Implement AES-GCM support for subtlecrypto (#34269)Simon Wülker2024-11-198-13367/+664
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support normalizing AES-GCM for encryption Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement "encrypt" operation for AES-GCM Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow importing AES-GCM keys Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement AES-GCM decryption Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow normalizing AES-GCM for "generate key" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * fmt Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix clippy errors Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove silly checks Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Support AES-GCM 128-bit encryption with 128 bit IV Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Support AES-GCM with wrapKey/unwrapKey Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations (again) Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* crypto: Support key wrap operations + AES-KW (#34262)Daniel Adams2024-11-185-1890/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support key wrapping operations + AES-KW Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * tidy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add allow for clippy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> * Improve JWK handling Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix clippy warnings Signed-off-by: Daniel Adams <msub2official@gmail.com> * ./mach fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Implement HMAC key generation (#34278)Simon Wülker2024-11-183-1826/+98
| | | | | | | | | | | | | * Implement HMAC key generation Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-11-173-0/+966
| | | | | b'6cf69a4f431581e9438681abc776029308ee8a8c' (#34265) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Implement `"get key length"` operation for HMAC algorithm (#34230)Simon Wülker2024-11-122-4608/+0
| | | | | | | | | | | | | * Implement "get key length" for HMAC keys Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement `crypto.subtle.sign/verify` with HMAC (#34223)Simon Wülker2024-11-113-518/+1
| | | | | | | | | | | | | | | | | | | | | * Allow importing HMAC keys Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement crypto.subtle.sign with HMAC Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement crypto.subtle.verify with HMAC Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement HKDF support for `subtlecrypto.deriveBits` (#34200)Simon Wülker2024-11-104-9045/+0
| | | | | | | | | | | | | * Implement subtlecrypto.deriveBits with HKDF Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* subtlecrypto: Replace `NormalizedAlgorithm` with specialized variants (#34193)Simon Wülker2024-11-091-9072/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement specialized normalize_algorithm for "get key length" operation Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement specialized normalize_algorithm for "digest" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement specialized normalize_algorithm for "importKey" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement specialized normalize_algorithm for "deriveBits" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement specialized normalize_algorithm for "decrypt" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement specialized normalize_algorithm for "generateKey" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement specialized normalize_algorithm for "encrypt" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove normalize_algorithm Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Replace obj.get_unsafe() with obj.get() Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Replace BitwiseOr with LogicalOr (typo) Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update more WPT expectations outside of WebCryptoAPI Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement `subtlecrypto.deriveKey` (#34185)Simon Wülker2024-11-085-13038/+0
| | | | | | | | | | | | | | | | | | | | | * Implement NormalizedAlgorithm::get_key_length This is a minimal implementation, which will make the DeriveKey operation work for AES-CTR keys in the future. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement SubtleCrypto.deriveKey Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement `SubtleCrypto.deriveBits` with PBDKF2 (#34164)Simon Wülker2024-11-068-4386/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start implementing SubtleCrypto.deriveBits Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Move shared crypto operations into their own functions Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update some doclinks Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove note about potential no-op It is, indeed, a no-op. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Move normalized algorithm digest operation into its own function Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement mvp for pbkdf2 derivation Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add missing division to derive bytes instead of bits The length argument specifies the number of bits that we need to derive, so we should divide it by 8 to get the number of bytes. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow using PBKDF2 with usage "importKey" Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix test-tidy errors Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix clippy warnings Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-11-031-0/+4
| | | | | b'd2f2efe271ae2fa661c52ed2fe8564e21ad4036f' (#34115) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Implement `SubtleCrypto.digest` (#34034)Simon Wülker2024-10-303-503/+0
| | | | | | | | | | | | | * Implement SubtleCrypto.digest Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-10-271-0/+48
| | | | | b'73d6bd0d61f0ad5341d0c2303a7638e3aa12a594' (#34029) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* crypto: Add support for AES-CTR operations (#33963)Daniel Adams2024-10-226-4796/+90
| | | | | | | | | | | | | | | | | | | | | | | | | * Add support for AES-CTR operations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * clippy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Consolidate encrypt/decrypt for AES-CTR Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* crypto: Implement encrypt/decrypt for AES-CBC + JWK support (#33795)Daniel Adams2024-10-2123-1359/+81705
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for raw importKey with AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Support JWK import/export, importKey for AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement encrypt/decrypt for AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update Cargo.lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Pass MutableHandleObject as arg instead of returning raw pointer Signed-off-by: Daniel Adams <msub2official@gmail.com> * Swap order of checks in generate_key_aes_cbc - Fixes WPT tests that expect to error on algorithm first before usages Signed-off-by: Daniel Adams <msub2official@gmail.com> * Avoid potential GC hazard with array_buffer_ptr Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations for discards context Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-10-204-0/+696
| | | | | b'5a9d9349a312e12a950d5f4703cd41609a06f242' (#33923) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* crypto: Begin SubtleCrypto implementation (#33628)Daniel Adams2024-10-0833-268/+19446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update IDLs and Bindings conf Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add AES crate Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement DOM interfaces Signed-off-by: Daniel Adams <msub2official@gmail.com> * IDL tidy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove deriveKey from inRealms for now until implemented Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix CryptoKey rustdoc comments Signed-off-by: Daniel Adams <msub2official@gmail.com> * Move string constants to top of file Signed-off-by: Daniel Adams <msub2official@gmail.com> * Use properly rooted CryptoKey Signed-off-by: Daniel Adams <msub2official@gmail.com> * Code clarity Signed-off-by: Daniel Adams <msub2official@gmail.com> * Rework NormalizedAlgorithm to not hold a DOMString Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add Rustdoc for CryptoKey interface Signed-off-by: Daniel Adams <msub2official@gmail.com> * Move ignore mallocsizeof to rand crate, remove from crypto Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update cargo lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix key handling, implement exportKey with JWK TODO Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> * Use create_buffer_source, remove aes dep from libservo Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix crash when running in worker Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Move CryptoKey and SubtleCrypto behind pref for now Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Readd timeout expectation Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Sync WPT with upstream (29-09-2024) (#33580)Servo WPT Sync2024-09-292-0/+7204
| | | | | | | | | | | | | | | * Update web-platform-tests to revision b'16d17064d2122cfa83b22f8bab32c96e6514c034' Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org> * Update big5-decode-csbig5.html.ini Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org> Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-09-2212-1012/+952
| | | | | b'8e164c249d2b93a4234a2710a5e2cc5a16fab499' (#33515) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Add checks for BigInt/BigUint in getRandomValues (#33485)Daniel Adams2024-09-181-49/+0
| | | Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-09-012-0/+98
| | | | | b'5d8ec746ed021738e7ee0cee92ad1a1814ba00fe' (#33274) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Implement crypto.randomUUID() (#33158)webbeef2024-08-222-32/+0
| | | Signed-off-by: webbeef <me@webbeef.org>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-07-073-0/+148
| | | | | b'4e3b5de2eb8218cf18a1674618994efeb96e2cc0' (#32717) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-06-231-2/+2
| | | | | b'f46bf6aa167e2838a8b93501a1a998ffde90d879' (#32581) Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
* Update web-platform-tests to revision ↵Servo WPT Sync2024-04-141-0/+6
| | | | b'daa07cf3c47652ed67e637f2a39bbc34f91cfe10' (#32071)
* Sync WPT with upstream (17-03-2024) (#31715)Servo WPT Sync2024-03-171-2/+239
| | | | | | | | | | | * Update raw lags path for WPT import I forgot to do this in #31616 * Update web-platform-tests to revision b'298d1599dbf6255aea63506daaa1702ff0c4fdc5' --------- Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* Sync WPT with upstream (01-01-2024) (#30962)Servo WPT Sync2024-01-011-0/+180
| | | | | | | | | * Update web-platform-tests to revision b'2a639a9fe4cdefd4ecd124a3f30caf631150eea5' * Update expectations --------- Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Sync WPT with upstream (08-10-2023) (#30516)Servo WPT Sync2023-10-081-0/+120
| | | | | | | | | | | | * Update web-platform-tests to revision b'3d46548c5fbeb3c1b5f6bc5ae0854e0a1a0462ff' * Revert expectation for column-count-crash.https.html Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Sync WPT with upstream (04-10-2023) (#30493)Servo WPT Sync2023-10-064-0/+3804
| | | | | | | | | | | | | | | * Update web-platform-tests to revision b'dfda99176a5d552fb1129fa353b7e4c69f6ed92c' * fix linter errors after WPT import Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Update expectations --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Run same tests for layout-2020 and layout-2013 (#30092)Oriol Brufau2023-08-1534-0/+1957
| | | | | | | | | | Most tests were only being run for layout-2013, not for layout-2020. This wasn't great since layout-2020 is now the default. So this patch unifies the lists of included tests for both layouts. For layout-2013 this implies adding css/css-content/, css/css-logical/ and css/css-masking/clip/. For layout-2020 this implies adding several additional css tests, and also tests like dom/, js/, html/, etc.
* Rename metadata directoriesMartin Robinson2023-06-2233-0/+11975
This renames: - `tests/wpt/metadata` → `tests/wpt/meta-legacy-layout` - `tests/wpt/metadata-layout-2020` → `tests/wpt/meta` - `tests/wpt/mozilla/meta` → `tests/wpt/mozilla/meta-legacy-layout` - `tests/wpt/mozilla/meta-layout-2020` → `tests/wpt/mozilla/meta`