From a6f858b1912b68d98a45fb3cebc832519dea7c85 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Fri, 25 Apr 2025 12:54:00 +0200 Subject: [PATCH] by_store.c: suppress in cache_objects() likely non-relevant error queue entries calling OSSL_STORE_find() Reviewed-by: Tomas Mraz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/27498) --- crypto/x509/by_store.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crypto/x509/by_store.c b/crypto/x509/by_store.c index d1e186f4fc2..39eb0a34173 100644 --- a/crypto/x509/by_store.c +++ b/crypto/x509/by_store.c @@ -43,8 +43,11 @@ static int cache_objects(X509_LOOKUP *lctx, const char *uri, * but it's a nice optimization when it can be applied (such as on an * actual directory with a thousand CA certs). */ - if (criterion != NULL) + if (criterion != NULL) { + ERR_set_mark(); OSSL_STORE_find(ctx, criterion); + ERR_pop_to_mark(); + } for (;;) { OSSL_STORE_INFO *info = OSSL_STORE_load(ctx); -- 2.47.2