Commit 5216ca8822a for php.net

commit 5216ca8822ac69cb29abf6c73e085c31802e3421
Author: Nora Dossche <7771979+ndossche@users.noreply.github.com>
Date:   Fri Apr 3 20:24:56 2026 +0200

    Fix build warning on LibreSSL (#21050)

    When trying to build on LibreSSL, I encounter the following build
    warning (this was observed on master, but applies to 8.4 too):
    ```
    /work/php-src/ext/openssl/openssl.c: In function 'zif_openssl_x509_parse':
    /work/php-src/ext/openssl/openssl.c:1101:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     1101 |                 purp = X509_PURPOSE_get0(i);
          |                      ^
    /work/php-src/ext/openssl/openssl.c:1110:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     1110 |                 pname = useshortnames ? X509_PURPOSE_get0_sname(purp) : X509_PURPOSE_get0_name(purp);

    ```

diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 1c1073345a1..fa104a1a43c 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2206,7 +2206,7 @@ PHP_FUNCTION(openssl_x509_parse)
 	for (i = 0; i < X509_PURPOSE_get_count(); i++) {
 		int id, purpset;
 		char * pname;
-		X509_PURPOSE * purp;
+		const X509_PURPOSE * purp;
 		zval subsub;

 		array_init(&subsub);