MCPcopy Index your code
hub / github.com/nodejs/node / testImportPkcs8PrivOnly

Function testImportPkcs8PrivOnly

test/parallel/test-webcrypto-export-import-ml-dsa.js:185–197  ·  view source on GitHub ↗
({ name, privateUsages }, extractable)

Source from the content-addressed store, hash-verified

183}
184
185async function testImportPkcs8PrivOnly({ name, privateUsages }, extractable) {
186 await assert.rejects(
187 subtle.importKey(
188 'pkcs8',
189 keyData[name].pkcs8_priv_only,
190 { name },
191 extractable,
192 privateUsages),
193 {
194 name: 'NotSupportedError',
195 message: 'Importing an ML-DSA PKCS#8 key without a seed is not supported',
196 });
197}
198
199async function testImportPkcs8MismatchedSeed({ name, privateUsages }, extractable) {
200 const modified = Buffer.from(keyData[name].pkcs8);

Calls

no outgoing calls

Tested by

no test coverage detected