Skip to content

Commit 80b20b8

Browse files
tniessenpanva
authored andcommitted
crypto: fix error capture when loading engine
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>
1 parent c8f5dd6 commit 80b20b8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/crypto/crypto_util.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,8 @@ EnginePointer LoadEngineById(const char* id, CryptoErrorStore* errors) {
607607
}
608608

609609
if (!engine && errors != nullptr) {
610-
if (ERR_get_error() != 0) {
611-
errors->Capture();
612-
} else {
610+
errors->Capture();
611+
if (errors->Empty()) {
613612
errors->Insert(NodeCryptoError::ENGINE_NOT_FOUND, id);
614613
}
615614
}

0 commit comments

Comments
 (0)