From 3fe84e7725946b5ec619f25eff07c19b083fa5cf Mon Sep 17 00:00:00 2001 From: cherry530 Date: Fri, 3 Feb 2023 16:13:15 +0800 Subject: [PATCH] fix build error Signed-off-by: cherry530 --- allow-compilation-against-OpenSSL-3.patch | 54 +++++++++++++++++++++++ cjose.spec | 6 ++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 allow-compilation-against-OpenSSL-3.patch diff --git a/allow-compilation-against-OpenSSL-3.patch b/allow-compilation-against-OpenSSL-3.patch new file mode 100644 index 0000000..f6a3406 --- /dev/null +++ b/allow-compilation-against-OpenSSL-3.patch @@ -0,0 +1,54 @@ +From c345a1ae4d41856ee5aa7a93f1cbad838649632c Mon Sep 17 00:00:00 2001 +From: Hans Zandbelt +Date: Tue, 5 Apr 2022 16:16:14 +0200 +Subject: [PATCH] allow compilation against OpenSSL 3 + +using "#define OPENSSL_API_COMPAT 0x10000000L" +closes https://github.com/zmartzone/cjose/pull/13 + +Signed-off-by: Hans Zandbelt +--- + src/jwe.c | 2 ++ + src/jwk.c | 2 ++ + src/jws.c | 2 ++ + 4 files changed, 7 insertions(+) + +diff --git a/src/jwe.c b/src/jwe.c +index b20c2c7..4285097 100644 +--- a/src/jwe.c ++++ b/src/jwe.c +@@ -5,6 +5,8 @@ + * Copyright (c) 2014-2016 Cisco Systems, Inc. All Rights Reserved. + */ + ++#define OPENSSL_API_COMPAT 0x10000000L ++ + #include + #include + #include +diff --git a/src/jwk.c b/src/jwk.c +index 860f0e7..2e4b241 100644 +--- a/src/jwk.c ++++ b/src/jwk.c +@@ -5,6 +5,8 @@ + * Copyright (c) 2014-2016 Cisco Systems, Inc. All Rights Reserved. + */ + ++#define OPENSSL_API_COMPAT 0x10000000L ++ + #include "include/jwk_int.h" + #include "include/util_int.h" + +diff --git a/src/jws.c b/src/jws.c +index 47fb880..d73debb 100644 +--- a/src/jws.c ++++ b/src/jws.c +@@ -5,6 +5,8 @@ + * Copyright (c) 2014-2016 Cisco Systems, Inc. All Rights Reserved. + */ + ++#define OPENSSL_API_COMPAT 0x10000000L ++ + #include + #include + #include diff --git a/cjose.spec b/cjose.spec index d9e3900..972bb67 100644 --- a/cjose.spec +++ b/cjose.spec @@ -1,11 +1,12 @@ Name: cjose Version: 0.6.1 -Release: 3 +Release: 4 Summary: C library implementing the Javascript Object Signing and Encryption (JOSE) License: MIT URL: https://github.com/cisco/cjose Source0: https://github.com/cisco/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch1: concatkdf.patch +Patch2: allow-compilation-against-OpenSSL-3.patch BuildRequires: gcc doxygen libtcnative-1-0 jansson-devel check-devel openssl-devel %description Implementation of JOSE for C/C++ @@ -48,5 +49,8 @@ make check || (cat test/test-suite.log; exit 1) %{_libdir}/pkgconfig/cjose.pc %changelog +* Fri Feb 03 2023 xu_ping - 0.6.1-4 +- Fix build failure due to openssl upgrade 3.0 + * Sat Jul 18 2020 yanan li - 0.6.1-3 - Package init -- Gitee