Commit 56849493370 for php.net

commit 5684949337009fdaed7487e49acab140c9e23df6
Author: ndossche <nora.dossche@ugent.be>
Date:   Tue Jan 27 12:03:51 2026 +0100

    Fix error check on X509V3_EXT_print()

    The docs I found of this function appear to be wrong, as it can also
    return -1 on failure.
    See also https://github.com/openssl/openssl/pull/29793

    Closes GH-21047.

diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 22f25a48eed..f8be531d8dd 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2252,7 +2252,7 @@ PHP_FUNCTION(openssl_x509_parse)
 				goto err_subitem;
 			}
 		}
-		else if (X509V3_EXT_print(bio_out, extension, 0, 0)) {
+		else if (X509V3_EXT_print(bio_out, extension, 0, 0) > 0) {
 			BIO_get_mem_ptr(bio_out, &bio_buf);
 			add_assoc_stringl(&subitem, extname, bio_buf->data, bio_buf->length);
 		} else {