summaryrefslogtreecommitdiffstats
path: root/crypto/engine
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-01-28 17:50:23 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-01-28 17:50:23 +0000
commitdf21765a3e8aa22786070a17012f7e371218ab81 (patch)
treef9467ee917f354146b3be3944b763bf021c463b9 /crypto/engine
parent5a6ae115f86024805a43193d7ab5756b9d74c58f (diff)
In engine_table_select() don't clear out entire error queue: just clear
out any we added using ERR_set_mark() and ERR_pop_to_mark() otherwise errors from other sources (e.g. SSL library) can be wiped.
Diffstat (limited to 'crypto/engine')
-rw-r--r--crypto/engine/eng_table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/engine/eng_table.c b/crypto/engine/eng_table.c
index 954b4d7970..4fde948185 100644
--- a/crypto/engine/eng_table.c
+++ b/crypto/engine/eng_table.c
@@ -254,6 +254,7 @@ ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f, in
#endif
return NULL;
}
+ ERR_set_mark();
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
/* Check again inside the lock otherwise we could race against cleanup
* operations. But don't worry about a fprintf(stderr). */
@@ -327,7 +328,7 @@ end:
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
/* Whatever happened, any failed init()s are not failures in this
* context, so clear our error state. */
- ERR_clear_error();
+ ERR_pop_to_mark();
return ret;
}