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 <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
  • Loading branch information
tniessen authored and danielleadams committed Feb 1, 2022
1 parent 115775f commit a40989f
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 @@ -597,9 +597,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 a40989f

Please sign in to comment.