mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
When calling `crypto.sign()`, if the `key` parameter object is missing the `key` property, the error message is wrong. Before the fix: TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received an instance of Object Expected: TypeError [ERR_INVALID_ARG_TYPE]: The "key.key property" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received undefined This seems like a copy&paste bug. Somebody copied from the end of the function, where this is correct, to here, where it's wrong. PR-URL: https://github.com/nodejs/node/pull/33482 Fixes: https://github.com/nodejs/node/issues/33480 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>