From 33083a0732d058d2eba2e49306a67090e9325151 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Oct 19 2016 00:21:25 +0000 Subject: openssl 1.1 fix --- diff --git a/xmms2-0.8DrO_o-openssl-1.1.patch b/xmms2-0.8DrO_o-openssl-1.1.patch new file mode 100644 index 0000000..e2157b2 --- /dev/null +++ b/xmms2-0.8DrO_o-openssl-1.1.patch @@ -0,0 +1,41 @@ +diff -up xmms2-0.8DrO_o/src/plugins/airplay/raop_client.c.openssl11 xmms2-0.8DrO_o/src/plugins/airplay/raop_client.c +--- xmms2-0.8DrO_o/src/plugins/airplay/raop_client.c.openssl11 2016-10-18 12:11:20.170416850 -0400 ++++ xmms2-0.8DrO_o/src/plugins/airplay/raop_client.c 2016-10-18 12:18:19.315015550 -0400 +@@ -31,6 +31,15 @@ + #define RAOP_RTSP_CONNECTED 0x40 + #define RAOP_RTSP_DONE 0x80 + ++/* Openssl 1.1.0 broke compatibility. We could depend on openssl 1.1.0, but ++ * it may take some time before distributions are able to upgrade to the new ++ * openssl version. To insulate ourselves from such transition problems, let's ++ * add a compatibility macro. ++ */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define RSA_set0_key(r, n_, e_, d) (r->n = n_, r->e = e_, 1) ++#endif ++ + typedef enum audio_jack_status { + AUDIO_JACK_CONNECTED, + AUDIO_JACK_DISCONNECTED +@@ -110,6 +119,8 @@ static gint + raop_rsa_encrypt (guchar *text, gint len, guchar *res) + { + RSA *rsa; ++ BIGNUM *n_bn; ++ BIGNUM *e_bn; + size_t size; + static const guchar mod[] = { + 0xe7,0xd7,0x44,0xf2,0xa2,0xe2,0x78,0x8b,0x6c,0x1f,0x55,0xa0, +@@ -137,8 +148,10 @@ raop_rsa_encrypt (guchar *text, gint len + static const guchar exp[] = {0x01, 0x00, 0x01}; + + rsa = RSA_new (); +- rsa->n = BN_bin2bn (mod, 256, NULL); +- rsa->e = BN_bin2bn (exp, 3, NULL); ++ n_bn = BN_bin2bn (mod, 256, NULL); ++ e_bn = BN_bin2bn (exp, 3, NULL); ++ /* TODO: Catch error here? */ ++ RSA_set0_key(rsa, n_bn, e_bn, NULL); + + size = RSA_public_encrypt (len, text, res, rsa, RSA_PKCS1_OAEP_PADDING); + diff --git a/xmms2.spec b/xmms2.spec index 63aca43..3355deb 100644 --- a/xmms2.spec +++ b/xmms2.spec @@ -5,7 +5,7 @@ Name: xmms2 Summary: A modular audio framework and plugin architecture Version: 0.8 -Release: 35%{?dist} +Release: 36%{?dist} License: LGPLv2+ and GPLv2+ and BSD Group: Applications/Multimedia # We can't use the upstream source tarball as-is, because it includes an mp4 decoder. @@ -29,6 +29,8 @@ Patch7: xmms2-0.8DrO_o-libmodplug-pkgconfig-change.patch Patch8: xmms2-0.8DrO_o-vorbis-pkgconfig-libs.patch # Remove deprecated usage on ruby 22 Patch9: xmms2-0.8DrO_o-ruby22-remove-deprecated-usage.patch +# Add support for OpenSSL 1.1 +Patch10: xmms2-0.8DrO_o-openssl-1.1.patch URL: http://wiki.xmms2.xmms.se/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: sqlite-devel, flac-devel, libofa-devel @@ -120,6 +122,7 @@ it executes the command passed as argument directly. %patch5 -p1 -b .versionsanity %patch7 -p1 -b .modplug_header %patch8 -p1 -b .vorbis_libs +%patch10 -p1 -b .openssl11 # This header doesn't need to be executable chmod -x src/include/xmmsclient/xmmsclient++/dict.h @@ -224,6 +227,9 @@ rm -rf %{buildroot} %{_bindir}/nyxmms2 %changelog +* Tue Oct 18 2016 Tom Callaway - 0.8-36 +- fix build against openssl 1.1 + * Tue Jul 19 2016 Fedora Release Engineering - 0.8-35 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages