]> git.kaiwu.me - njs.git/commit
WebCrypto: fixed RSA JWK test data for Node.js compatibility.
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 4 Apr 2026 01:22:22 +0000 (18:22 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Mon, 6 Apr 2026 22:24:37 +0000 (15:24 -0700)
commite22d057df1cb52eeb7b901ca9e2c074ff14073ba
tree91f75d91b507944942841acf948a606a79945c57
parent42b4b62afaeec63c1722219eb78f8e7751c702ce
WebCrypto: fixed RSA JWK test data for Node.js compatibility.

Removed the incorrect "alg":"RS256" field from RSA JWK test data
files.  The field is optional per RFC 7517, and the value RS256
(RSASSA-PKCS1-v1_5) was wrong for tests that use RSA-OAEP and
RSA-PSS algorithms.  Node.js correctly rejects JWK imports when
the "alg" field does not match the requested algorithm.

The hash mismatch negative test was updated to use an inline JWK
with an explicit "alg" field instead of the shared file.

This ensures: `test/test262 --binary=node test/webcrypto` pass.
test/webcrypto/import.t.mjs
test/webcrypto/rsa.dec.jwk
test/webcrypto/rsa.enc.pub.jwk
test/webcrypto/rsa.jwk
test/webcrypto/rsa.pub.jwk