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 <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
  • 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
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 1799ea3

Please sign in to comment.