Closed Bug 1718919 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 29565 - Support BigInt/Uint64Array in crypto.getRandomValues

Categories

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

task

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream][domsecurity-backlog])

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

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

b'Timothy Gu <timothygu@chromium.org>' wrote:

Support BigInt/Uint64Array in crypto.getRandomValues

The check for "integer arrays" is to prevent people from using
getRandomValues with floating-point arrays, which doesn't work as people
might expect. However, the check was not updated when Chrome gained
support for BigInt64Array and BigUint64Array, which do work as expected.
This allows code fragments such as

 const b = new BigInt64Array(10);
 crypto.getRandomValues(b);

See https://github.com/w3c/webcrypto/issues/255 for the spec issue.

Bug: 1225765
Change-Id: I338ecc5594492e6f329580f4e8f04d367f866361
Reviewed-on: https://chromium-review.googlesource.com/3002049
WPT-Export-Revision: 7080cff46b3d344f66c0aca0fea60f0d2c2ce760

Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]

CI Results

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

Total 2 tests and 6 subtests

Status Summary

Firefox

OK : 2
FAIL: 12

Chrome

OK : 2
FAIL: 12

Safari

OK : 2
FAIL: 12

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/WebCryptoAPI/getRandomValues-bigint.tentative.any.worker.html
Integer array: BigInt64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Large length: BigInt64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Null arrays: BigInt64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Integer array: BigUint64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Large length: BigUint64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Null arrays: BigUint64Array: FAIL (Chrome: FAIL, Safari: FAIL)
/WebCryptoAPI/getRandomValues-bigint.tentative.any.html
Integer array: BigInt64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Large length: BigInt64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Null arrays: BigInt64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Integer array: BigUint64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Large length: BigUint64Array: FAIL (Chrome: FAIL, Safari: FAIL)
Null arrays: BigUint64Array: FAIL (Chrome: FAIL, Safari: FAIL)

Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]

This will be automatically fixed as part of bug 1718932.

Depends on: 1718932
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d1c491b1f6d0 [wpt PR 29565] - Update wpt metadata, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/18dccd9c4563 [wpt PR 29565] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in before you can comment on or make changes to this bug.