From 6028bd7906e67dad0a368164a98f71b1b402b84e Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Thu, 11 Aug 2022 11:52:41 +0200 Subject: [PATCH] crypto: allow zero-length secret KeyObject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/44201 Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Backport-PR-URL: https://github.com/nodejs/node/pull/44872 --- doc/api/crypto.md | 3 +++ lib/internal/crypto/keys.js | 3 --- src/crypto/crypto_keys.cc | 1 - test/parallel/test-crypto-hmac.js | 9 +++++++++ test/parallel/test-crypto-key-objects.js | 22 ++++++++++------------ 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 2571e8a068d..77f34c79405 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -3530,6 +3530,9 @@ and it will be impossible to extract the private key from the returned object.