Closed Bug 1797635 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 36676 - Migrate WebCrypto ecdsa.json tests to WPT

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 36676 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/36676
Details from upstream follow.

David Benjamin <davidben@chromium.org> wrote:

Migrate WebCrypto ecdsa.json tests to WPT

ecdsa.json contains:

  • A handful of ECDSA tests across curves and hash algorithms
  • JWT and SPKI importers
  • Some specially crafted invalid signatures

Of these, the first two seem to be redundant with WPT tests. The third
one is unique; WPT's current negative tests are just made by modifying
successful inputs.

I've just removed the first two (we can rely on BoringSSL tests for
fine-grained algorithm tests, WebCrypto just needs to test the general
API and plumbing) and upstreamed the third.

While I'm here, I've also updated rsa.js to check signature output
equality for deterministic algorithms. This is a slightly stronger check
than just checking two signatures give the same output. (Our unit tests
check the latter.)

Bug: 375569
Change-Id: Ida998dfc668084adaf2c596013ea7ec62756ce78

Reviewed-on: https://chromium-review.googlesource.com/3982905
WPT-Export-Revision: 20dc095a3d6073a7af895bc554c3e1415a901f1f

Component: web-platform-tests → DOM: Security
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 6 tests and 89 subtests

Status Summary

Firefox

OK : 6
PASS: 590
FAIL: 24

Chrome

OK : 6
PASS: 614

Safari

OK : 6
PASS: 614

Links

GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

  • /WebCryptoAPI/sign_verify/ecdsa.https.any.worker.html [wpt.fyi]
    • ECDSA P-256 with SHA-1 verification failure due to bad hash name: FAIL
    • ECDSA P-256 with SHA-256 verification failure due to bad hash name: FAIL
    • ECDSA P-256 with SHA-384 verification failure due to bad hash name: FAIL
    • ECDSA P-256 with SHA-512 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-1 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-256 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-384 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-512 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-1 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-256 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-384 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-512 verification failure due to bad hash name: FAIL
  • /WebCryptoAPI/sign_verify/ecdsa.https.any.html [wpt.fyi]
    • ECDSA P-256 with SHA-1 verification failure due to bad hash name: FAIL
    • ECDSA P-256 with SHA-256 verification failure due to bad hash name: FAIL
    • ECDSA P-256 with SHA-384 verification failure due to bad hash name: FAIL
    • ECDSA P-256 with SHA-512 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-1 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-256 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-384 verification failure due to bad hash name: FAIL
    • ECDSA P-384 with SHA-512 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-1 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-256 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-384 verification failure due to bad hash name: FAIL
    • ECDSA P-521 with SHA-512 verification failure due to bad hash name: FAIL

New Tests That Don't Pass

  • /WebCryptoAPI/sign_verify/ecdsa.https.any.worker.html [wpt.fyi]
    • ECDSA P-256 with SHA-1 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-256 with SHA-256 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-256 with SHA-384 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-256 with SHA-512 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-1 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-256 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-384 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-512 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-1 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-256 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-384 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-512 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
  • /WebCryptoAPI/sign_verify/ecdsa.https.any.html [wpt.fyi]
    • ECDSA P-256 with SHA-1 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-256 with SHA-256 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-256 with SHA-384 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-256 with SHA-512 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-1 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-256 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-384 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-384 with SHA-512 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-1 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-256 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-384 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
    • ECDSA P-521 with SHA-512 verification failure due to bad hash name: FAIL (Chrome: PASS, Safari: PASS)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5529e34aaf75 [wpt PR 36676] - Migrate WebCrypto ecdsa.json tests to WPT, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.