MCPcopy Create free account
hub / github.com/nodejs/node / testImportPkcs8PrivOnly

Function testImportPkcs8PrivOnly

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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected