Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177572482
D55921.1794774093.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D55921.1794774093.diff
View Options
diff --git a/lang/php84/Makefile b/lang/php84/Makefile
--- a/lang/php84/Makefile
+++ b/lang/php84/Makefile
@@ -140,6 +140,10 @@
CONFIGURE_ARGS+= --with-password-argon2=${LOCALBASE}
. endif
+. if ${SSL_DEFAULT:Mlibressl*}
+EXTRA_PATCHES+= ${PATCHDIR}/libressl-patch-ext_openssl_openssl.c
+. endif
+
CONFIGURE_ENV+= ac_cv_decimal_fp_supported="no" \
lt_cv_path_SED="sed" \
OPENSSL_CFLAGS="-I${OPENSSLINC}" \
diff --git a/lang/php84/files/libressl-patch-ext_openssl_openssl.c b/lang/php84/files/libressl-patch-ext_openssl_openssl.c
new file mode 100644
--- /dev/null
+++ b/lang/php84/files/libressl-patch-ext_openssl_openssl.c
@@ -0,0 +1,35 @@
+https://github.com/openbsd/ports/blob/master/lang/php/8.4/patches/patch-ext_openssl_openssl_c
+
+--- ext/openssl/openssl.c.orig 2026-03-10 15:51:04 UTC
++++ ext/openssl/openssl.c
+@@ -2308,7 +2308,7 @@ static STACK_OF(X509) *php_openssl_load_all_certs_from
+ goto end;
+ }
+
+- if(!(stack = sk_X509_new_reserve(NULL, sk_X509_INFO_num(sk)))) {
++ if(!(stack = sk_X509_new_null())) {
+ php_openssl_store_errors();
+ goto end;
+ }
+@@ -2317,7 +2317,11 @@ static STACK_OF(X509) *php_openssl_load_all_certs_from
+ while (sk_X509_INFO_num(sk)) {
+ xi=sk_X509_INFO_shift(sk);
+ if (xi->x509 != NULL) {
+- sk_X509_push(stack,xi->x509);
++ if(sk_X509_push(stack,xi->x509) == 0) {
++ php_error_docref(NULL, E_ERROR, "Memory allocation failure");
++ sk_X509_pop_free(stack,X509_free);
++ goto end;
++ }
+ xi->x509=NULL;
+ }
+ X509_INFO_free(xi);
+@@ -3828,7 +3832,7 @@ static EVP_PKEY * php_openssl_generate_private_key(str
+ /* {{{ php_openssl_generate_private_key */
+ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req)
+ {
+- if (req->priv_key_bits < MIN_KEY_LENGTH) {
++ if (req->priv_key_type != OPENSSL_KEYTYPE_EC && req->priv_key_bits < MIN_KEY_LENGTH) {
+ php_error_docref(NULL, E_WARNING, "Private key length must be at least %d bits, configured to %d",
+ MIN_KEY_LENGTH, req->priv_key_bits);
+ return NULL;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 8:21 PM (21 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41748268
Default Alt Text
D55921.1794774093.diff (1 KB)
Attached To
Mode
D55921: lang/php84: fix build with LibreSSL
Attached
Detach File
Event Timeline