Skip to content

Commit

Permalink
src: remove deprecated HMAC_Init, use HMAC_Init_ex
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
bnoordhuis authored and Fishrock123 committed Jul 5, 2016
1 parent b7e661b commit 2816418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2816418

Please sign in to comment.