[php-src] PR #25684: Use libctx for X509 store lookups and verification in ext/openssl
| From: | bukka | Date: | Mon, 23 Nov 2026 21:47:30 +0000 |
| Subject: | [php-src] PR #25684: Use libctx for X509 store lookups and verification in ext/openssl | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40937@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25684
Author: bukka
php_openssl_setup_verify() loaded CA files using X509_LOOKUP_load_file() which always creates the
certificates in the default library context. Use X509_LOOKUP_load_file_ex() with the configured
libctx and propq instead.
There is no libctx variant of X509_LOOKUP_add_dir() because the hash dir lookup loads certificates
lazily using the libctx of the X509_STORE_CTX doing the verification. So php_openssl_check_cert()
now creates the store context using X509_STORE_CTX_new_ex().
This is part of GH-14734.