From dbd212a8a152b1e777b3f7baaa261dec40ca8f19 Mon Sep 17 00:00:00 2001 From: BufoViridis <30531954+BufoViridis@users.noreply.github.com> Date: Tue, 30 Jan 2018 19:43:50 +0200 Subject: [PATCH] update node_crypto.cc As the documentation for crypto.pbkdf2 (https://nodejs.org/dist/latest-v8.x/docs/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback) say, the function on success will return the first argument set to null and not undefined. --- src/node_crypto.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index b572c90aa50037..036ffa7cd9a9ed 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4918,7 +4918,7 @@ void PBKDF2Request::Work(uv_work_t* work_req) { void PBKDF2Request::After(Local (*argv)[2]) { if (success_) { - (*argv)[0] = Undefined(env()->isolate()); + (*argv)[0] = Null(env()->isolate()); (*argv)[1] = Buffer::New(env(), key_, keylen_).ToLocalChecked(); key_ = nullptr; keylen_ = 0;