Skip to content

Commit 1799ea3

Browse files
codebyteretargos
authored andcommitted
crypto: use compatible version of EVP_CIPHER_name
PR-URL: #38925 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent 9ba5518 commit 1799ea3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/crypto/crypto_cipher.cc

+5-1
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,14 @@ void GetCipherInfo(const FunctionCallbackInfo<Value>& args) {
145145
return;
146146
}
147147

148+
// OBJ_nid2sn(EVP_CIPHER_nid(cipher)) is used here instead of
149+
// EVP_CIPHER_name(cipher) for compatibility with BoringSSL.
148150
if (info->Set(
149151
env->context(),
150152
env->name_string(),
151-
OneByteString(env->isolate(), EVP_CIPHER_name(cipher))).IsNothing()) {
153+
OneByteString(
154+
env->isolate(),
155+
OBJ_nid2sn(EVP_CIPHER_nid(cipher)))).IsNothing()) {
152156
return;
153157
}
154158

0 commit comments

Comments
 (0)