| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5978eb1 commit 73cd9dd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1542,6 +1542,24 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); | |||
| 1542 | 1542 | } | |
| 1543 | 1543 | ); | |
| 1544 | 1544 | } | |
| 1545 | + | ||
| 1546 | + assert.throws(() => generateKeyPair('rsa-pss', { | ||
| 1547 | + modulusLength: 512, | ||
| 1548 | + hashAlgorithm: 'sha2', | ||
| 1549 | + }, common.mustNotCall()), { | ||
| 1550 | + name: 'TypeError', | ||
| 1551 | + code: 'ERR_CRYPTO_INVALID_DIGEST', | ||
| 1552 | + message: 'md specifies an invalid digest' | ||
| 1553 | + }); | ||
| 1554 | + | ||
| 1555 | + assert.throws(() => generateKeyPair('rsa-pss', { | ||
| 1556 | + modulusLength: 512, | ||
| 1557 | + mgf1HashAlgorithm: 'sha2', | ||
| 1558 | + }, common.mustNotCall()), { | ||
| 1559 | + name: 'TypeError', | ||
| 1560 | + code: 'ERR_CRYPTO_INVALID_DIGEST', | ||
| 1561 | + message: 'mgf1_md specifies an invalid digest' | ||
| 1562 | + }); | ||
| 1545 | 1563 | } | |
| 1546 | 1564 | ||
| 1547 | 1565 | // Passing an empty passphrase string should not cause OpenSSL's default | |
| Back | FazBrowse Home | New Git URL |
0 commit comments