From 911ff342553a78f162bc30f53237a5a80c757b8c Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 4 Jun 2021 10:37:03 +0200 Subject: [PATCH] crypto: use compatible version of EVP_CIPHER_name PR-URL: https://github.com/nodejs/node/pull/38925 Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann --- src/crypto/crypto_cipher.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc index 198297d4edbd88..6abfc2cce7da79 100644 --- a/src/crypto/crypto_cipher.cc +++ b/src/crypto/crypto_cipher.cc @@ -145,10 +145,14 @@ void GetCipherInfo(const FunctionCallbackInfo& args) { return; } + // OBJ_nid2sn(EVP_CIPHER_nid(cipher)) is used here instead of + // EVP_CIPHER_name(cipher) for compatibility with BoringSSL. if (info->Set( env->context(), env->name_string(), - OneByteString(env->isolate(), EVP_CIPHER_name(cipher))).IsNothing()) { + OneByteString( + env->isolate(), + OBJ_nid2sn(EVP_CIPHER_nid(cipher)))).IsNothing()) { return; }