Bug#818285: non-functional (at least in jessie-backports)

2016-07-12 Thread Gaetano Guerriero
This should be fixed with version 2.6.1 in sid.

 Gaetano



Bug#818285: non-functional (at least in jessie-backports)

2016-03-19 Thread Gaetano Guerriero
On Tue, Mar 15, 2016 at 03:50:07PM +0100, Christoph Egger wrote:

> Seems to be dying on some SSL error, backtrace attached.
> 
> Christoph
> 
> /usr/lib/python3.4/http/client.py in __init__(self, host, port, key_file, 
> cert_file, timeout, source_address, context, check_hostname)
>1209 check_hostname = will_verify
>1210 elif check_hostname and not will_verify:
> -> 1211 raise ValueError("check_hostname needs a SSL context 
> with "
>1212  "either CERT_OPTIONAL or 
> CERT_REQUIRED")
>1213 if key_file or cert_file:
> 
> ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or 
> CERT_REQUIRED

httplib2 is quite buggy in ssl certificates validation.

This bug should be ideally fixed there, but mantainer seems not very responsive
lately (there is a relative bug opened with no response:
https://github.com/jcgregorio/httplib2/issues/324).

To keep it short, with python 3.4.2 (jessie) httplib2 sends wrong parameters to
underlying http.client, and there it breaks. With python 3.4.4 the default
validation policy changed so we have no problems on stretch (and no problems
with python 2.7 too).

I've have prepared a patch, if Bastian wants to merge it, that conditionally
forces validation for python3 < 3.4.3.
https://github.com/venthur/python-debianbts/pull/27

With this patch I got tests passing on stretch with python 2.7, 3.4.4 and 3.5.1,
and on jessie with python 2.7 and 3.4.2.


 Gaetano



Bug#818285: non-functional (at least in jessie-backports)

2016-03-15 Thread Christoph Egger
Package: python3-debianbts
Version: 2.6.0~bpo8+1
Severity: normal

Hi!

Seems to be dying on some SSL error, backtrace attached.

Christoph

-- System Information:
Debian Release: 8.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'oldstable')
Architecture: mipsel (mips64)

Kernel: Linux 3.16.0-4-loongson-2f
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-debianbts depends on:
ii  python3-pysimplesoap  1.16-1~bpo8+1

python3-debianbts recommends no packages.

python3-debianbts suggests no packages.

-- no debconf information
In [1]: import debianbts

In [2]: debianbts.get_status(123456)
---
ValueErrorTraceback (most recent call last)
 in ()
> 1 debianbts.get_status(123456)

/usr/lib/python3/dist-packages/debianbts.py in get_status(*nrs)
255 method_el = SimpleXMLElement('')
256 _build_int_array_el('arg0', method_el, slice_)
--> 257 reply = soap_client.call('get_status', method_el)
258 for bug_item_el in reply('s-gensym3').children() or []:
259 bug_el = bug_item_el.children()[1]

/usr/lib/python3/dist-packages/pysimplesoap/client.py in call(self, method, 
*args, **kwargs)
258 
259 self.xml_request = request.as_xml()
--> 260 self.xml_response = self.send(method, self.xml_request)
261 response = SimpleXMLElement(self.xml_response, 
namespace=self.namespace,
262 jetty=self.__soap_server in 
('jetty',))

/usr/lib/python3/dist-packages/pysimplesoap/client.py in send(self, method, xml)
311 
312 response, content = self.http.request(
--> 313 location, http_method, body=xml, headers=headers)
314 self.response = response
315 self.content = content

/usr/lib/python3/dist-packages/httplib2/__init__.py in request(self, uri, 
method, body, headers, redirections, connection_type)
   1171 ca_certs=self.ca_certs,
   1172 disable_ssl_certificate_validation=
-> 1173 
self.disable_ssl_certificate_validation)
   1174 else:
   1175 conn = self.connections[conn_key] = connection_type(

/usr/lib/python3/dist-packages/httplib2/__init__.py in __init__(self, host, 
port, key_file, cert_file, timeout, proxy_info, ca_certs, 
disable_ssl_certificate_validation)
826 self, host, port=port, key_file=key_file,
827 cert_file=cert_file, timeout=timeout, context=context,
--> 828 check_hostname=True)
829 
830 

/usr/lib/python3.4/http/client.py in __init__(self, host, port, key_file, 
cert_file, timeout, source_address, context, check_hostname)
   1209 check_hostname = will_verify
   1210 elif check_hostname and not will_verify:
-> 1211 raise ValueError("check_hostname needs a SSL context 
with "
   1212  "either CERT_OPTIONAL or 
CERT_REQUIRED")
   1213 if key_file or cert_file:

ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or 
CERT_REQUIRED