Commit 3a956d99e69 for php

commit 3a956d99e693000daff9327009416722246bc292
Author: Eugene Gvozdetsky <gvozdet@gmail.com>
Date:   Mon Sep 14 18:36:49 2026 +0200

    Fix GH-20920: only register PKCS7_NO_DUAL_CONTENT when it is defined

    PKCS7_NO_DUAL_CONTENT was only added in LibreSSL 4.3.0, so the generated
    registration in openssl_arginfo.h fails to compile against older releases.
    Guard the constant on the macro itself rather than on LIBRESSL_VERSION_NUMBER
    so that LibreSSL 4.3.0 and later, which added the macro in response to this
    report, keep exposing the constant.

    Closes GH-23689

diff --git a/NEWS b/NEWS
index af9564888d1..9d11ecb6d76 100644
--- a/NEWS
+++ b/NEWS
@@ -814,6 +814,9 @@ PHP                                                                        NEWS
   . Fixed bug GH-23758 (PDO_Firebird returns null for non-null empty BLOBs).
     (Lazizbek Ergashev)

+- OpenSSL:
+  . Fixed bug GH-20920 (Build failure with LibreSSL). (Eugene Gvozdetsky)
+
 - PGSQL:
   . Fixed pg_lo_write() rejecting data containing null bytes. (Ilia Alshanetsky)
   . Removed pg_service(), unavailable with any released libpq. (KentarouTakeda)
diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php
index 94902a4acf0..656aed529b3 100644
--- a/ext/openssl/openssl.stub.php
+++ b/ext/openssl/openssl.stub.php
@@ -181,11 +181,13 @@
  * @cvalue PKCS7_NOCRL
  */
 const PKCS7_NOCRL = UNKNOWN;
+#ifdef PKCS7_NO_DUAL_CONTENT
 /**
  * @var int
  * @cvalue PKCS7_NO_DUAL_CONTENT
  */
 const PKCS7_NO_DUAL_CONTENT = UNKNOWN;
+#endif

 /**
  * @var int
diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h
index 796582c185b..4247aad7617 100644
Binary files a/ext/openssl/openssl_arginfo.h and b/ext/openssl/openssl_arginfo.h differ