Skip to content

Commit 61057ac

Browse files
committed
crypto: use compatible version of EVP_CIPHER_name
1 parent e7f941c commit 61057ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/crypto/crypto_cipher.cc

Lines changed: 5 additions & 1 deletion
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)