[php-src] PR #25524: ext/openssl: Restore the string mask after a config with string_mask
| From: | ArtUkrainskiy | Date: | Tue, 17 Nov 2026 16:02:34 +0000 |
| Subject: | [php-src] PR #25524: ext/openssl: Restore the string mask after a config with string_mask | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40729@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25524
Author: ArtUkrainskiy
Fixes GH-25522
string_mask from a config is applied with
ASN1_STRING_set_default_mask_asc(), which is process-wide, and nothing restored it.
This saves the mask before it's set and restores it in
php_openssl_dispose_config().
The test fails without the fix. The ext/openssl tests pass on 8.4 and 8.5. On 8.4 they also pass
with ASan. I also checked php-fpm with one worker.
In 8.5 this code moved to openssl_backend_common.c and
php_openssl_backend.h, so the merge up to 8.5 will conflict.