@@ -489,12 +489,12 @@ index af2146982c7a3bf7bd7527f44e4b17a3b605026e..f6b91f675cfea367c608892dee078b56
489
489
// Non-XOF hash functions should accept valid outputLength options as well.
490
490
assert.strictEqual(crypto.createHash('sha224', { outputLength: 28 })
491
491
diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js
492
- index 3159b0da3f2901aab17e0b360eda84decaed9eb3..995b7f6b45bd0aa83eef143b15dede5658ac1bc0 100644
492
+ index aa03a0379a291a4632b68d428d4e1875d60166a3..b89071d41abfe731551b0445f2a92fd797165c98 100644
493
493
--- a/test/parallel/test-crypto-key-objects.js
494
494
+++ b/test/parallel/test-crypto-key-objects.js
495
- @@ -310 ,11 +310 ,11 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
495
+ @@ -307 ,11 +307 ,11 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
496
496
}, common.hasOpenSSL3 ? {
497
- message: 'Failed to read private key ',
497
+ message: 'error:1E08010C:DECODER routines::unsupported ',
498
498
} : {
499
499
- message: 'error:0909006C:PEM routines:get_name:no start line',
500
500
- code: 'ERR_OSSL_PEM_NO_START_LINE',
@@ -554,15 +554,6 @@ index 3159b0da3f2901aab17e0b360eda84decaed9eb3..995b7f6b45bd0aa83eef143b15dede56
554
554
{
555
555
// Reading an encrypted key without a passphrase should fail.
556
556
assert.throws(() => createPrivateKey(privateDsa), common.hasOpenSSL3 ? {
557
- @@ -550,7 +552,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
558
- }), {
559
- message: common.hasOpenSSL3 ?
560
- 'error:07880109:common libcrypto routines::interrupted or cancelled' :
561
- - /bad decrypt/
562
- + /bad decrypt|BAD_DECRYPT/
563
- });
564
-
565
- const publicKey = createPublicKey(publicDsa);
566
557
@@ -573,7 +575,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
567
558
() => privateKey.export({ format: 'jwk' }),
568
559
{ code: 'ERR_CRYPTO_JWK_UNSUPPORTED_KEY_TYPE' });
@@ -643,22 +634,22 @@ index 4612fc4a1ac40a27ccc2c70ac11e32f0fdcaa2c3..a4d604cf0318cfb0771e3573245b1ed9
643
634
}
644
635
645
636
{
646
- @@ -566 ,6 +574 ,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
637
+ @@ -562 ,6 +562 ,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
647
638
});
648
639
}));
649
640
650
- + /*
641
+ + /*
651
642
// Test async elliptic curve key generation, e.g. for ECDSA, with an encrypted
652
643
// private key with paramEncoding explicit.
653
644
generateKeyPair('ec', {
654
- @@ -603,6 +612,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
655
- passphrase: 'top secret'
656
- });
657
- }));
658
- + */
645
+ @@ -688,6 +689,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
646
+ });
659
647
}
660
648
649
+ + */
661
650
// Test invalid parameter encoding.
651
+ {
652
+ assert.throws(() => generateKeyPairSync('ec', {
662
653
@@ -951,6 +961,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
663
654
}
664
655
}
0 commit comments