From 6e93c17bf51bad21441474f3a795760a2a2175d3 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 2 Jun 2021 12:20:42 +0200 Subject: [PATCH] crypto: use EVP_get_cipherbynid directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/38901 Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Anna Henningsen --- src/crypto/crypto_cipher.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc index 4629143d47e492..3ec212ee52b976 100644 --- a/src/crypto/crypto_cipher.cc +++ b/src/crypto/crypto_cipher.cc @@ -62,7 +62,7 @@ void GetCipherInfo(const FunctionCallbackInfo& args) { cipher = EVP_get_cipherbyname(*name); } else { int nid = args[1].As()->Value(); - cipher = EVP_get_cipherbyname(OBJ_nid2sn(nid)); + cipher = EVP_get_cipherbynid(nid); } if (cipher == nullptr)