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 authored and targos committed Jun 11, 2021
1 parent 9ba5518 commit 1799ea3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/crypto/crypto_cipher.cc
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 1799ea3

Please sign in to comment.