Skip to content

Commit

Permalink
crypto: fix error capture when loading engine
Browse files Browse the repository at this point in the history
PR-URL: #41187
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
  • Loading branch information
tniessen authored and targos committed Jan 14, 2022
1 parent 6da7909 commit 8ea56a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/crypto/crypto_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,8 @@ EnginePointer LoadEngineById(const char* id, CryptoErrorStore* errors) {
}

if (!engine && errors != nullptr) {
if (ERR_get_error() != 0) {
errors->Capture();
} else {
errors->Capture();
if (errors->Empty()) {
errors->Insert(NodeCryptoError::ENGINE_NOT_FOUND, id);
}
}
Expand Down

0 comments on commit 8ea56a9

Please sign in to comment.