Lines Matching defs:key
63 key: keyPem,
75 key: certPem,
86 key: certPem,
184 const errMessage = /^Error:.*data too large for key size$/;
195 key: keyPem,
202 key: keyPem,
212 key: keyPem,
217 key: keyPem,
230 key: certPem,
235 key: certPem,
248 key: certPem,
254 key: certPem,
264 key: certPem,
270 key: certPem,
291 key: cert,
300 for (const key in examples) {
301 const example = examples[key];
315 key: keyPem,
327 key: keyPem,
341 key: keyPem,
357 // Test throws exception when key options is null
497 const keys = [['ec-key.pem', 64], ['dsa_private_1025.pem', 40]];
504 crypto.sign('sha1', data, { key: privKey, dsaEncoding: 'der' }),
517 const opts = { key: privKey, dsaEncoding: 'ieee-p1363' };
548 key: fixtures.readKey('ec-key.pem'),
556 key: fixtures.readKey('ec-key.pem'),
567 key: keyPem,
573 key: certPem,
580 key: certPem,
589 key: certPem,
613 key: privkey,
638 // This key pair does not restrict the message digest algorithm or salt
646 for (const key of [privatePem, privateKey]) {
651 const signature = crypto.sign(algo, 'foo', { key, saltLength });
653 for (const pkey of [key, publicKey, publicPem]) {
657 { key: pkey, saltLength },
669 // This key pair enforces sha256 as the message digest and the MGF1
679 for (const key of [privatePem, privateKey]) {
682 crypto.sign('sha1', 'foo', key);
688 crypto.sign('sha256', 'foo', { key, saltLength });
694 const signature = crypto.sign('sha256', 'foo', { key, saltLength });
696 for (const pkey of [key, publicKey, publicPem]) {
700 { key: pkey, saltLength },
711 // This key enforces sha512 as the message digest and sha256 as the MGF1
723 // specified as part of the key, it should automatically switch to that.
725 for (const key of [privatePem, privateKey]) {
730 crypto.sign(algo, 'foo', key);
735 const signature = crypto.sign('sha512', 'foo', key);
737 for (const pkey of [key, publicKey, publicPem]) {
756 message: /digest too big for rsa key/
762 for (const key of ['', 'foo', null, undefined, true, Boolean]) {
764 crypto.verify('sha256', 'foo', { key, format: 'jwk' }, Buffer.alloc(0));
765 }, { code: 'ERR_INVALID_ARG_TYPE', message: /The "key\.key" property must be of type object/ });
767 crypto.createVerify('sha256').verify({ key, format: 'jwk' }, Buffer.alloc(0));
768 }, { code: 'ERR_INVALID_ARG_TYPE', message: /The "key\.key" property must be of type object/ });
770 crypto.sign('sha256', 'foo', { key, format: 'jwk' });
771 }, { code: 'ERR_INVALID_ARG_TYPE', message: /The "key\.key" property must be of type object/ });
773 crypto.createSign('sha256').sign({ key, format: 'jwk' });
774 }, { code: 'ERR_INVALID_ARG_TYPE', message: /The "key\.key" property must be of type object/ });