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>
v7.x
Ben Noordhuis 9 years ago
parent
commit
26a918f4f5
  1. 2
      src/node_crypto.cc

2
src/node_crypto.cc

@ -3594,7 +3594,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