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 Myles Borins committed Jul 14, 2016
1 parent 7305e7b commit 61de6e9
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 61de6e9

Please sign in to comment.