Bug#828609: xmms2: FTBFS with openssl 1.1.0

2016-08-31 Thread Sebastian Andrzej Siewior
On 2016-08-30 22:39:59 [+0200], Rémi Vanicat wrote:
> Thank you.
You are welcome.

> I've no airplay functioning here, have you test it, or just make it
> build?

I just made it build.

> Cordially,
> Rémi Vanicat

Sebastian



Bug#828609: xmms2: FTBFS with openssl 1.1.0

2016-08-30 Thread Rémi Vanicat
Sebastian Andrzej Siewior  writes:

> control: tags -1 patch
>
> On 2016-06-26 12:24:53 [+0200], Kurt Roeckx wrote:
>> OpenSSL 1.1.0 is about to released.  During a rebuild of all packages using
>> OpenSSL this package fail to build.  A log of that build can be found at:
>> https://breakpoint.cc/openssl-1.1-rebuild-2016-05-29/Attempted/xmms2_0.8+dfsg-16_amd64-20160529-1557
>
> builds.

Thank you.

I've no airplay functioning here, have you test it, or just make it
build?

Cordially,
Rémi Vanicat



Bug#828609: xmms2: FTBFS with openssl 1.1.0

2016-08-30 Thread Sebastian Andrzej Siewior
control: tags -1 patch

On 2016-06-26 12:24:53 [+0200], Kurt Roeckx wrote:
> OpenSSL 1.1.0 is about to released.  During a rebuild of all packages using
> OpenSSL this package fail to build.  A log of that build can be found at:
> https://breakpoint.cc/openssl-1.1-rebuild-2016-05-29/Attempted/xmms2_0.8+dfsg-16_amd64-20160529-1557

builds.

> Kurt

Sebastian
>From e5d09947146fda8ad2829c5e77462824161e832e Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior 
Date: Tue, 30 Aug 2016 19:01:11 +
Subject: [PATCH] plugins/ariplay: build against openssl 1.1.0

Signed-off-by: Sebastian Andrzej Siewior 
---
 src/plugins/airplay/raop_client.c | 25 +++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/plugins/airplay/raop_client.c b/src/plugins/airplay/raop_client.c
index 17097e0..5310f6f 100644
--- a/src/plugins/airplay/raop_client.c
+++ b/src/plugins/airplay/raop_client.c
@@ -135,15 +135,34 @@ raop_rsa_encrypt (guchar *text, gint len, guchar *res)
 		0x5e,0xf,0xc8,0x75,0x34,0x3e,0xc7,0x82,0x11,0x76,0x25,0xcd
 		,0xbf,0x98,0x44,0x7b};
 	static const guchar exp[] = {0x01, 0x00, 0x01};
+	BIGNUM *n, *e;
 
 	rsa = RSA_new ();
-	rsa->n = BN_bin2bn (mod, 256, NULL);
-	rsa->e = BN_bin2bn (exp, 3, NULL);
+	n = BN_bin2bn (mod, 256, NULL);
+	e = BN_bin2bn (exp, 3, NULL);
+	if (!rsa || !n || !e)
+		goto err;
+
+#if OPENSSL_VERSION_NUMBER < 0x1010
+	rsa->n = n;
+	rsa->e = e;
+#else
+	if (!RSA_set0_key(rsa, n, e, NULL))
+		goto err;
+#endif
 
 	size = RSA_public_encrypt (len, text, res, rsa, RSA_PKCS1_OAEP_PADDING);
 
 	RSA_free (rsa);
 	return size;
+err:
+	if (rsa)
+		RSA_free(rsa);
+	if (n)
+		BN_free(n);
+	if (e)
+		BN_free(e);
+	return 0;
 }
 
 static void
@@ -250,6 +269,8 @@ raop_rtsp_announce (raop_client_t *rc)
 	gint ret = RAOP_EOK;
 
 	size = raop_rsa_encrypt (rc->aes_key_str, 16, enc_aes_key);
+	if (size == 0)
+		return RAOP_EFAIL;
 
 	size = b64_encode_alloc (enc_aes_key, size, );
 	g_strdelimit (key, "=", '\0');
-- 
2.9.3



Bug#828609: xmms2: FTBFS with openssl 1.1.0

2016-06-26 Thread Kurt Roeckx
Source: xmms2
Version: 0.8+dfsg-16
Severity: important
Control: block 827061 by -1

Hi,

OpenSSL 1.1.0 is about to released.  During a rebuild of all packages using
OpenSSL this package fail to build.  A log of that build can be found at:
https://breakpoint.cc/openssl-1.1-rebuild-2016-05-29/Attempted/xmms2_0.8+dfsg-16_amd64-20160529-1557

On https://wiki.openssl.org/index.php/1.1_API_Changes you can see various of the
reasons why it might fail.  There are also updated man pages at
https://www.openssl.org/docs/manmaster/ that should contain useful information.

There is a libssl-dev package available in experimental that contains a recent
snapshot, I suggest you try building against that to see if everything works.

If you have problems making things work, feel free to contact us.


Kurt