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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
bnoordhuis authored and Myles Borins committed Jul 12, 2016
1 parent d6f0681 commit 289eb34
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 @@ -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;
Expand Down

0 comments on commit 289eb34

Please sign in to comment.