From c47f887dee4934e695015f7c1d26d491c8de3353 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 2571e8a068d8b3..77f34c79405ec0 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.