Implement QuotaExceededError as a DOMException-derived interface per the WebIDL specification update. QuotaExceededError is now a proper constructor exposed as a global [Exposed=*] interface that extends DOMException with optional `quota` and `requested` attributes (both nullable doubles, defaulting to null). The constructor validates that quota and requested are finite, non-negative, and that requested is not less than quota when both are provided. QuotaExceededError is [Serializable] and supports structuredClone, preserving the quota and requested values across the serialization boundary. Callers updated: - crypto.getRandomValues() now throws a QuotaExceededError instance - WebStorage (C++) now constructs QuotaExceededError directly Refs: https://redirect.github.com/whatwg/webidl/pull/1465 Fixes: https://github.com/nodejs/node/issues/58987 PR-URL: https://github.com/nodejs/node/pull/62293 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
73 lines
2.4 KiB
JavaScript
73 lines
2.4 KiB
JavaScript
'use strict';
|
|
|
|
const os = require('node:os');
|
|
|
|
const { hasOpenSSL } = require('../../common/crypto.js');
|
|
|
|
const s390x = os.arch() === 's390x';
|
|
|
|
const conditionalSkips = {};
|
|
|
|
function skip(...files) {
|
|
for (const file of files) {
|
|
conditionalSkips[file] = {
|
|
'skip': `Unsupported in OpenSSL ${process.versions.openssl}`,
|
|
};
|
|
}
|
|
}
|
|
|
|
if (!hasOpenSSL(3, 0)) {
|
|
skip(
|
|
'encrypt_decrypt/aes_ocb.tentative.https.any.js',
|
|
'generateKey/failures_AES-OCB.tentative.https.any.js',
|
|
'generateKey/failures_kmac.tentative.https.any.js',
|
|
'generateKey/successes_AES-OCB.tentative.https.any.js',
|
|
'generateKey/successes_kmac.tentative.https.any.js',
|
|
'import_export/AES-OCB_importKey.tentative.https.any.js',
|
|
'import_export/KMAC_importKey.tentative.https.any.js',
|
|
'sign_verify/kmac.tentative.https.any.js');
|
|
}
|
|
|
|
if (!hasOpenSSL(3, 2)) {
|
|
skip(
|
|
'derive_bits_keys/argon2.tentative.https.any.js',
|
|
'import_export/Argon2_importKey.tentative.https.any.js');
|
|
}
|
|
|
|
if (!hasOpenSSL(3, 5)) {
|
|
skip(
|
|
'encap_decap/encap_decap_bits.tentative.https.any.js',
|
|
'encap_decap/encap_decap_keys.tentative.https.any.js',
|
|
'generateKey/failures_ML-DSA.tentative.https.any.js',
|
|
'generateKey/failures_ML-KEM.tentative.https.any.js',
|
|
'generateKey/successes_ML-DSA.tentative.https.any.js',
|
|
'generateKey/successes_ML-KEM.tentative.https.any.js',
|
|
'import_export/ML-DSA_importKey.tentative.https.any.js',
|
|
'import_export/ML-KEM_importKey.tentative.https.any.js',
|
|
'sign_verify/mldsa.tentative.https.any.js');
|
|
}
|
|
|
|
module.exports = {
|
|
...conditionalSkips,
|
|
'algorithm-discards-context.https.window.js': {
|
|
'skip': 'Not relevant in Node.js context',
|
|
},
|
|
'historical.any.js': {
|
|
'skip': 'Not relevant in Node.js context',
|
|
},
|
|
'sign_verify/eddsa_small_order_points.https.any.js': {
|
|
'fail': {
|
|
'note': 'see https://github.com/nodejs/node/issues/54572',
|
|
'expected': [
|
|
'Ed25519 Verification checks with small-order key of order - Test 1',
|
|
'Ed25519 Verification checks with small-order key of order - Test 2',
|
|
'Ed25519 Verification checks with small-order key of order - Test 12',
|
|
'Ed25519 Verification checks with small-order key of order - Test 13',
|
|
...(s390x ? [] : [
|
|
'Ed25519 Verification checks with small-order key of order - Test 0',
|
|
'Ed25519 Verification checks with small-order key of order - Test 11',
|
|
]),
|
|
],
|
|
},
|
|
},
|
|
};
|