]> git.ipfire.org Git - thirdparty/openssl.git/commit
Rework the "by store" X509_LOOKUP method to open the given URI early
authorRichard Levitte <levitte@openssl.org>
Wed, 30 Apr 2025 09:38:04 +0000 (11:38 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 6 May 2025 10:04:34 +0000 (12:04 +0200)
commit0f57419dad8e10df5762601a4765ceea64d5c796
tree97e748b3920c4c6f3edf02ee2ed7a8861bfe47ca
parent2417ddcc3daba364c8927b1d1e6db3edafa4a7d8
Rework the "by store" X509_LOOKUP method to open the given URI early

The cached X509_LOOKUP method data is no longer just the URI, but now
includes the OSSL_STORE_CTX pointer, and required parameters to reopen
the URI at any time.  cache_objects() is modified to handle this, and
only (re)open the URI when it wasn't previously opened, or when it was
closed by an earlier call.

This way, we can call OSSL_STORE_open_ex() in by_store_ctrl_ex(), and
get to see possible errors when the URI is loaded.

This assumes that if the URI could be opened once, it can be opened
again.

Fixes #27461

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27550)
crypto/x509/by_store.c