Repository navigation
crypto.generateKeyPair generates error ERR_OSSL_CRYPTO_MALLOC_FAILURE in node 17.2.0 #41428
Description
Activity
- addedcryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.opensslIssues and PRs related to the OpenSSL dependency.Issues and PRs related to the OpenSSL dependency.
on Jan 7, 2022 Not sure if it's intended or not, but the error only occurs when the private key encryption passphrase is empty, when one is provided this works as expected, likewise when no encryption is requested it's fine.
cc @nodejs/crypto
I'm using this in my test suite, setting
passphraseto a string like'hello'does indeed allow me to run my test suite on both node 16 and node 17.I think this is a bug in OpenSSL, so I sent a report with my findings: openssl/openssl#17506
My fix landed in the OpenSSL repo: openssl/openssl#17507! Will cherry-pick it to https://github.com/quictls/openssl tomorrow.
@RaisinTen was this cherry picked over?
@mhdawson I had sent the cherry-pick PR to the quictls repo - quictls/openssl#75 but I'm yet to get a review from the maintainers.
Thanks for the update, was just wondering if it was progressing.,
Reacted by Darshan SenSent a cherry-pick pr to Node.js anyways because my change has already landed in the openssl repo - #42319
- added a commit that references this issue
on Mar 17, 2022 - linked a pull request that will close this issuetest,crypto: add and update empty passphrase regression tests #42319
on Mar 17, 2022 - added a commit that references this issue
on Mar 19, 2022 - added a commit that references this issue
on Mar 21, 2022 - added 4 commits that reference this issue
on Apr 21, 2022 - added a commit that references this issue
on Apr 25, 2022
Version
17.2.0
Platform
Linux raynos-Precision-5530 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
crypto
What steps will reproduce the bug?
Run the following script in node 17.2.0 and node 16.
Node 16 has no error, node 17 has an err
The err is
How often does it reproduce? Is there a required condition?
every time on linux and mac.
What is the expected behavior?
I expected node 17 to not have a regression
What do you see instead?
I see an error.
Additional information
No response