!19 OpenSSL should ignore missing config file

From: @meng-wenhua 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-01-13 09:46:14 +00:00 committed by Gitee
commit 334b2c81a4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 23c8fd736abda6331e38ca045735d636390336f5 Mon Sep 17 00:00:00 2001
From: Alan Antonuk <alan.antonuk@gmail.com>
Date: Sat, 8 Sep 2018 11:48:35 -0700
Subject: [PATCH] OpenSSL should ignore missing config file
When initializing OpenSSL in v1.1.0 or later, tell OpenSSL to ignore
missing openssl.cnf.
Fixes #523
---
librabbitmq/amqp_openssl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c
index bcd5ba5..1fac25d 100644
--- a/librabbitmq/amqp_openssl.c
+++ b/librabbitmq/amqp_openssl.c
@@ -584,8 +584,9 @@ static int setup_openssl(void) {
CRYPTO_set_locking_callback(ssl_locking_callback);
#ifdef AMQP_OPENSSL_V110
- if (CONF_modules_load_file(NULL, "rabbitmq-c", CONF_MFLAGS_DEFAULT_SECTION) <=
- 0) {
+ if (CONF_modules_load_file(
+ NULL, "rabbitmq-c",
+ CONF_MFLAGS_DEFAULT_SECTION | CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) {
status = AMQP_STATUS_SSL_ERROR;
goto out;
}
--
2.37.3.windows.1

View File

@ -4,7 +4,7 @@
Name: librabbitmq
Version: 0.9.0
Release: 7
Release: 8
Summary: The AMQP client library
License: MIT
URL: https://github.com/alanxz/rabbitmq-c
@ -13,6 +13,7 @@ Source0: https://github.com/alanxz/%{project_name}/archive/%{git_commit}/%{pro
Patch0000: CVE-2019-18609.patch
Patch6000: backport-0001-Fix-instructions-for-default-build.patch
Patch6001: backport-0001-OpenSSL-should-ignore-missing-config-file.patch
BuildRequires: cmake > 2.8
BuildRequires: popt-devel > 1.14
@ -69,6 +70,9 @@ make test
%changelog
* Sat Jan 7 2023 mengwenhua <mengwenhua@xfusion.com> - 0.9.0-8
- OpenSSL should ignore missing config file
* Fri Jan 6 2023 mengwenhua <mengwenhua@xfusion.com> - 0.9.0-7
- Type:bugfix
- CVE:NA