(cert, vector)
| 290 | { |
| 291 | // We only test verification as we cannot specify explicit salts when signing |
| 292 | function testVerify(cert, vector) { |
| 293 | const verified = crypto.createVerify('SHA1') |
| 294 | .update(Buffer.from(vector.message, 'hex')) |
| 295 | .verify({ |
| 296 | key: cert, |
| 297 | padding: crypto.constants.RSA_PKCS1_PSS_PADDING, |
| 298 | saltLength: vector.salt.length / 2 |
| 299 | }, vector.signature, 'hex'); |
| 300 | assert.strictEqual(verified, true); |
| 301 | } |
| 302 | |
| 303 | const examples = JSON.parse(fixtures.readSync('pss-vectors.json', 'utf8')); |
| 304 |
no test coverage detected