diff --git a/src/node_crypto.cc b/src/node_crypto.cc index ca5b656817d1ec..7ca97057c0ba12 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3648,8 +3648,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo& args) { bool Hmac::HmacUpdate(const char* data, int len) { if (!initialised_) return false; - HMAC_Update(&ctx_, reinterpret_cast(data), len); - return true; + int r = HMAC_Update(&ctx_, reinterpret_cast(data), len); + return r == 1; }