From a3ce8bd969ae7d37b3daacba987de3499fd02d5e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Sat, 7 Aug 2021 12:33:05 -0400 Subject: [PATCH] Drop usage of removed macro ERR_GET_FUNC() Signed-off-by: Stephen Gallagher --- 0001-Drop-usage-of-ERR_GET_FUNC.patch | 34 +++++++++++++++++++++++++++ sscg.spec | 10 +++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0001-Drop-usage-of-ERR_GET_FUNC.patch diff --git a/0001-Drop-usage-of-ERR_GET_FUNC.patch b/0001-Drop-usage-of-ERR_GET_FUNC.patch new file mode 100644 index 0000000..97adf7c --- /dev/null +++ b/0001-Drop-usage-of-ERR_GET_FUNC.patch @@ -0,0 +1,34 @@ +From 60377ad4a6a6ef2012d502f118fedb425f4a11af Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Sat, 7 Aug 2021 11:48:04 -0400 +Subject: [PATCH] Drop usage of ERR_GET_FUNC() + +This macro was dropped in OpenSSL 3.0 and has actually not been +providing a valid return code for some time. + +Related: rhbz#1964837 + +Signed-off-by: Stephen Gallagher +--- + include/sscg.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/include/sscg.h b/include/sscg.h +index d4499227ea5bd23ac5cae27680438cfe0709fbc4..99788e6001791b658298626d464edcdc7e4ba2cc 100644 +--- a/include/sscg.h ++++ b/include/sscg.h +@@ -94,11 +94,10 @@ + if (_sslret != 1) \ + { \ + /* Get information about error from OpenSSL */ \ + unsigned long _ssl_error = ERR_get_error (); \ + if ((ERR_GET_LIB (_ssl_error) == ERR_LIB_UI) && \ +- (ERR_GET_FUNC (_ssl_error) == UI_F_UI_SET_RESULT_EX) && \ + ((ERR_GET_REASON (_ssl_error) == UI_R_RESULT_TOO_LARGE) || \ + (ERR_GET_REASON (_ssl_error) == UI_R_RESULT_TOO_SMALL))) \ + { \ + fprintf ( \ + stderr, \ +-- +2.31.1 + diff --git a/sscg.spec b/sscg.spec index c4c0512..4354230 100644 --- a/sscg.spec +++ b/sscg.spec @@ -9,7 +9,7 @@ Name: sscg Version: 3.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple SSL certificate generator License: GPLv3+ with exceptions @@ -26,6 +26,9 @@ BuildRequires: ninja-build BuildRequires: help2man +Patch0001: 0001-Drop-usage-of-ERR_GET_FUNC.patch + + %description A utility to aid in the creation of more secure "self-signed" certificates. The certificates created by this tool are generated in a @@ -55,6 +58,10 @@ false signatures from the service certificate. %{_mandir}/man8/%{name}.8* %changelog +* Sat Aug 07 2021 Stephen Gallagher - 3.0.0-2 +- Drop usage of removed macro ERR_GET_FUNC() +- Related: rhbz#1964837 + * Wed Jul 21 2021 Stephen Gallagher - 3.0.0-1 - Release 3.0.0 - Support for OpenSSL 3.0 @@ -282,3 +289,4 @@ false signatures from the service certificate. * Mon Mar 16 2015 Stephen Gallagher 0.1-1 - First packaging +