Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2013 16:27:10 -0600 (CST)
From:      Michael Stowe <mstowe@chicago.us.mensa.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/174916: audio/pianobar - patch to fix TLS issue for Pandora One users
Message-ID:  <201301022227.r02MRAPv017328@baddomain.com>
Resent-Message-ID: <201301022230.r02MU2g7075887@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174916
>Category:       ports
>Synopsis:       audio/pianobar - patch to fix TLS issue for Pandora One users
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 02 22:30:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Michael Stowe
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD baddomain.com 9.1-STABLE FreeBSD 9.1-STABLE #18: Tue Jan 1 10:38:49 CST 2013 root@baddomain.com:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
For people with Pandora One accounts, Pandora appears to prematurely abort the
TLS session, which throws an error in pianobar, which then prevents the program
from working.  This patch intercepts the error and allows pianobar to work.
>How-To-Repeat:
I believe you need a Pandora One (paid) account with Pandora.  To reproduce the
error, try to use pianobar with this account.
>Fix:
Attached

--- pianobar.patch begins here ---
diff -ruN pianobar.orig/files/patch-waitress.c pianobar/files/patch-waitress.c
--- pianobar.orig/files/patch-waitress.c	1969-12-31 18:00:00.000000000 -0600
+++ pianobar/files/patch-waitress.c	2013-01-02 16:17:14.000000000 -0600
@@ -0,0 +1,17 @@
+--- src/libwaitress/waitress.c.orig	2013-01-02 16:12:36.000000000 -0600
++++ src/libwaitress/waitress.c	2013-01-02 08:44:41.000000000 -0600
+@@ -537,6 +537,14 @@
+ 
+ 	ssize_t ret = gnutls_record_recv (waith->request.tlsSession, buf, size);
+ 	if (ret < 0) {
++		if (ret == GNUTLS_E_UNEXPECTED_PACKET_LENGTH
++#ifdef GNUTLS_E_PREMATURE_TERMINATION
++					   || ret == GNUTLS_E_PREMATURE_TERMINATION
++#endif
++					) {
++			*retSize = 0;
++			return waith->request.readWriteRet;
++		}
+ 		return WAITRESS_RET_TLS_READ_ERR;
+ 	} else {
+ 		*retSize = ret;
--- pianobar.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301022227.r02MRAPv017328>