On Mon, Mar 27, 2017 at 09:26:45PM +0200, Henning K wrote:
> Package: gpodder
> Version: 3.9.3-1
> Severity: normal
> 
> Dear Maintainer,
> 
> when I tried to subscribe to this feed https://requestforcomments.de/feed 
> using
> the gtk-ui as well as the cli gpodder raised a SSLV3_ALERT_HANDSHAKE_FAILURE.
 

Hello, and thank you reporting this bug.  I have reproduced the bug
within gpodder but also making the same request directly using the
urllib2 library (which is how gpodder opens the URL).

The attached test programs demonstrate that problem exists in urllib2:

$ python2.7 858855_urllib2_test.py 
Traceback (most recent call last):
  File "858855_urllib2_test.py", line 4, in <module>
    opener.open(request)
  File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
    context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 
alert handshake failure (_ssl.c:661)>

But not when using the requests library:

$ python2.7 858855_requests_test.py 
status_code 200
request body length 41558

Thus the problem seems to lie with the SSL negotiation between the site
and any python code utilizing the urllib2 library.

I need to do some more digging, but believe that it could be a variant
of #678035 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678035).

Cheers,
tony
import urllib2
opener = urllib2.build_opener()
request = urllib2.Request(url='https://requestforcomments.de/feed')
opener.open(request)
import requests
r = requests.get('https://requestforcomments.de/feed')
print "status_code", r.status_code
print "request body length", len(r.text)

Attachment: signature.asc
Description: PGP signature

Reply via email to