diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 6d2bb54bdee357..96b37fd976ec97 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3329,7 +3329,7 @@ void Hmac::HmacInit(const char* hash_type, const char* key, int key_len) { if (key_len == 0) { key = ""; } - if (!HMAC_Init(&ctx_, key, key_len, md)) { + if (!HMAC_Init_ex(&ctx_, key, key_len, md, nullptr)) { return ThrowCryptoError(env(), ERR_get_error()); } initialised_ = true;