Browse Source

src: remove deprecated HMAC_Init, use HMAC_Init_ex

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
v4.x
Ben Noordhuis 9 years ago
committed by Myles Borins
parent
commit
61de6e9b47
  1. 2
      src/node_crypto.cc

2
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;

Loading…
Cancel
Save