1 Star 0 Fork 33

shafeipaozi/php

forked from src-openEuler/php 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
php-8.3.0-openssl-ec-param.patch 1.60 KB
一键复制 编辑 原始数据 按行查看 历史
shafeipaozi 提交于 2024-03-02 01:28 . update
From 21f9d16e130b412b6839494dcf30a2f1d7dcee0f Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 24 Jul 2023 10:54:49 +0200
Subject: [PATCH] Always warn about missing curve_name
Both Fedora and RHEL do not support arbitrary EC parameters
See https://bugzilla.redhat.com/2223953
---
ext/openssl/openssl.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 33f51bfa4d..340b0467d3 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -4299,13 +4299,8 @@ static bool php_openssl_pkey_init_legacy_ec(EC_KEY *eckey, zval *data, bool *is_
OPENSSL_PKEY_SET_BN(data, b);
OPENSSL_PKEY_SET_BN(data, order);
+ php_error_docref(NULL, E_WARNING, "Missing params: curve_name (params only is not supported by OpenSSL)");
if (!(p && a && b && order)) {
- if (!p && !a && !b && !order) {
- php_error_docref(NULL, E_WARNING, "Missing params: curve_name");
- } else {
- php_error_docref(
- NULL, E_WARNING, "Missing params: curve_name or p, a, b, order");
- }
goto clean_exit;
}
@@ -4455,12 +4450,8 @@ static EVP_PKEY *php_openssl_pkey_init_ec(zval *data, bool *is_private) {
OPENSSL_PKEY_SET_BN(data, b);
OPENSSL_PKEY_SET_BN(data, order);
+ php_error_docref(NULL, E_WARNING, "Missing params: curve_name");
if (!(p && a && b && order)) {
- if (!p && !a && !b && !order) {
- php_error_docref(NULL, E_WARNING, "Missing params: curve_name");
- } else {
- php_error_docref(NULL, E_WARNING, "Missing params: curve_name or p, a, b, order");
- }
goto cleanup;
}
--
2.41.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shafeipaozi/php.git
git@gitee.com:shafeipaozi/php.git
shafeipaozi
php
php
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385