From 8e7d5b2b9d2023e892bd81c59e37d168b95ff794 Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Wed, 14 Nov 2018 14:35:32 +0100 Subject: [PATCH] Reflect changes in libcurl error codes --- ...man-2.6.5-libcurl-error-codes-update.patch | 27 +++++++++++++++++++ openwsman.spec | 8 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 openwsman-2.6.5-libcurl-error-codes-update.patch diff --git a/openwsman-2.6.5-libcurl-error-codes-update.patch b/openwsman-2.6.5-libcurl-error-codes-update.patch new file mode 100644 index 0000000..82ee51f --- /dev/null +++ b/openwsman-2.6.5-libcurl-error-codes-update.patch @@ -0,0 +1,27 @@ +diff -up openwsman-2.6.5/src/lib/wsman-curl-client-transport.c.orig openwsman-2.6.5/src/lib/wsman-curl-client-transport.c +--- openwsman-2.6.5/src/lib/wsman-curl-client-transport.c.orig 2018-11-14 13:53:27.442138557 +0100 ++++ openwsman-2.6.5/src/lib/wsman-curl-client-transport.c 2018-11-14 14:11:28.508714204 +0100 +@@ -186,16 +186,23 @@ convert_to_last_error(CURLcode r) + return WS_LASTERR_SSL_CONNECT_ERROR; + case CURLE_BAD_FUNCTION_ARGUMENT: + return WS_LASTERR_CURL_BAD_FUNCTION_ARG; ++#if LIBCURL_VERSION_NUM < 0x073E00 + case CURLE_SSL_PEER_CERTIFICATE: + return WS_LASTERR_SSL_PEER_CERTIFICATE; ++#endif + case CURLE_SSL_ENGINE_NOTFOUND: + return WS_LASTERR_SSL_ENGINE_NOTFOUND; + case CURLE_SSL_ENGINE_SETFAILED: + return WS_LASTERR_SSL_ENGINE_SETFAILED; + case CURLE_SSL_CERTPROBLEM: + return WS_LASTERR_SSL_CERTPROBLEM; ++#if LIBCURL_VERSION_NUM < 0x073E00 + case CURLE_SSL_CACERT: + return WS_LASTERR_SSL_CACERT; ++#else ++ case CURLE_PEER_FAILED_VERIFICATION: ++ return WS_LASTERR_SSL_PEER_CERTIFICATE; ++#endif + #if LIBCURL_VERSION_NUM > 0x70C01 + case CURLE_SSL_ENGINE_INITFAILED: + return WS_LASTERR_SSL_ENGINE_INITFAILED; diff --git a/openwsman.spec b/openwsman.spec index 1d75065..8603375 100644 --- a/openwsman.spec +++ b/openwsman.spec @@ -3,7 +3,7 @@ Name: openwsman Version: 2.6.5 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Open source Implementation of WS-Management License: BSD @@ -20,6 +20,7 @@ Patch2: openwsman-2.4.12-ruby-binding-build.patch Patch3: openwsman-2.6.2-openssl-1.1-fix.patch Patch4: openwsman-2.6.5-http-status-line.patch Patch5: openwsman-2.6.5-fix-set-cipher-list-retval-check.patch +Patch6: openwsman-2.6.5-libcurl-error-codes-update.patch BuildRequires: swig BuildRequires: libcurl-devel libxml2-devel pam-devel sblim-sfcc-devel BuildRequires: python3 python3-devel ruby ruby-devel rubygems-devel perl-interpreter @@ -127,6 +128,7 @@ You can use it to send shell commands to a remote Windows hosts. %patch3 -p1 -b .openssl-1.1-fix %patch4 -p1 -b .http-status-line %patch5 -p1 -b .fix-set-cipher-list-retval-check +%patch6 -p1 -b .libcurl-error-codes-update %build # Removing executable permissions on .c and .h files to fix rpmlint warnings. @@ -283,6 +285,10 @@ rm -f /var/log/wsmand.log %{_bindir}/winrs %changelog +* Wed Nov 14 2018 Vitezslav Crhonek - 2.6.5-10 +- Reflect changes in libcurl error codes + Resolves: #1649393 + * Mon Oct 01 2018 Vitezslav Crhonek - 2.6.5-9 - Require the Python interpreter directly instead of using the package name