Skip to content

Commit 8ea56a9

Browse files
tniessentargos
authored andcommitted
crypto: fix error capture when loading engine
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]>
1 parent 6da7909 commit 8ea56a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/crypto/crypto_util.cc

+2-3
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)