Skip to content

Commit

Permalink
crypto: use compatible version of EVP_CIPHER_name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
codebytere committed Jun 8, 2021
1 parent 1fc4d43 commit 911ff34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/crypto/crypto_cipher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,14 @@ void GetCipherInfo(const FunctionCallbackInfo<Value>& 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;
}

Expand Down

0 comments on commit 911ff34

Please sign in to comment.