0

Since 2 days ago the Pushbullet Kodi addon stop working, throwing this error:

EOF occurred in violation of protocol (_ssl.c:590)

The GET is made through httplib2 and you can see the simple code there.

The strange is that also with the openssl cli I get error:

$ openssl s_client -connect api.pushbullet.com:443              
CONNECTED(00000003)
140625036449432:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 307 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1481297548
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

Info:

$ openssl version
OpenSSL 1.0.2j  26 Sep 2016
$ uname -a
Linux meanmachine 4.8.11-1-ARCH #1 SMP PREEMPT Sun Nov 27 09:26:14 CET 2016 x86_64 GNU/Linux

Thanks for any suggestion!

edit:

The code that throw error on Python2.7:

import httplib2
h = httplib2.Http()
h.request('https://api.pushbullet.com/v2/devices', method='GET')

Traceback (most recent call last):

 File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1609, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1351, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1272, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1036, in connect
    self.disable_ssl_certificate_validation, self.ca_certs)
  File "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 80, in _ssl_wrap_socket
    cert_reqs=cert_reqs, ca_certs=ca_certs)
  File "/usr/lib/python2.7/ssl.py", line 933, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 601, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 830, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:590)

p.s. works like a charm on python3.5

elbowz
  • 557
  • 1
  • 4
  • 19
  • Please show the relevant code, and state the error code when the error occurs. We can't tell anything about your code from the external commands you run. – jww Dec 09 '16 at 16:01
  • @jww sorry...I have added some info. On my pc the same code work good with python v3.5.2...not with 2.7.12 – elbowz Dec 10 '16 at 10:30

2 Answers2

2

I have solved switching by httplib2 to requests python lib.

and install:

python2.7 -m pip install pyopenssl pyasn1 ndg-httpsclient
elbowz
  • 557
  • 1
  • 4
  • 19
0

On OS X, this solved my issue.

sudo -H pip install requests[security] --upgrade --ignore-installed six

H. U.
  • 627
  • 1
  • 10
  • 25