Commit 883014debb6 for php.net
commit 883014debb631c6e389df0057e5dc35a8791cc78
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date: Sat Apr 4 12:54:31 2026 +0200
Fix const-generic warning in xp_ssl.c
```
ext/openssl/xp_ssl.c:423:24: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
423 | if (!(wildcard = strchr(certname, '*')) || memchr(certname, '.', wildcard - certname)) {
| ^
```
Since these typically turn into errors with -Werror, fix the build
already.
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 64812c28042..11a6b56bf44 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -413,7 +413,7 @@ static bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val)
static bool php_openssl_matches_wildcard_name(const char *subjectname, const char *certname) /* {{{ */
{
- char *wildcard = NULL;
+ const char *wildcard = NULL;
ptrdiff_t prefix_len;
size_t suffix_len, subject_len;