geeknote icon indicating copy to clipboard operation
geeknote copied to clipboard

SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

Open sammcj opened this issue 10 years ago • 1 comments

I've installed Geeknote on OSX 10.11.1 and when I go to lunch it and login for the first time the following occurs:

~/git/geeknote (master|✔) % geeknote login
  > : Authorize...Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/geeknote-0.2a0-py2.7.egg/geeknote/geeknote.py", line 883, in main
    User().login(**ARGS)
  File "/usr/local/lib/python2.7/site-packages/geeknote-0.2a0-py2.7.egg/geeknote/geeknote.py", line 35, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/geeknote-0.2a0-py2.7.egg/geeknote/geeknote.py", line 397, in login
    if self.getEvernote().auth():
  File "/usr/local/lib/python2.7/site-packages/geeknote-0.2a0-py2.7.egg/geeknote/geeknote.py", line 151, in auth
    self.authToken = GNA.getToken()
  File "/usr/local/lib/python2.7/site-packages/geeknote-0.2a0-py2.7.egg/geeknote/oauth.py", line 133, in getToken
    self.getTmpOAuthToken()
  File "/usr/local/lib/python2.7/site-packages/geeknote-0.2a0-py2.7.egg/geeknote/oauth.py", line 151, in getTmpOAuthToken
    oauth_callback="https://" + self.url['base']
  File "/usr/local/lib/python2.7/site-packages/geeknote-0.2a0-py2.7.egg/geeknote/oauth.py", line 104, in loadPage
    conn.request(method, uri, params, headers)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1093, in _send_request
    self.endheaders(body)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1049, in endheaders
    self._send_output(message_body)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 893, in _send_output
    self.send(msg)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 855, in send
    self.connect()
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1274, in connect
    server_hostname=server_hostname)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 352, in wrap_socket
    _context=self)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 579, in __init__
    self.do_handshake()
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 808, in do_handshake
    self._sslobj.do_handshake()
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Python 2.7.10

sammcj avatar Oct 28 '15 01:10 sammcj

I want to install and use geeknote as well and am facing the exact same issue as above. I use python version 2.7.9. I think it is due to the recent PEP8 changes in Python.

Further information can be obtained here: http://stackoverflow.com/questions/27835619/ssl-certificate-verify-failed-error https://www.python.org/dev/peps/pep-0476/

I do not know how to work around this problem with geeknote. Tried using the below workaround in oauth.py, but it only skips the check for the first login/access attempt and causes the same error in the successive ones..

        import ssl
        context = ssl._create_unverified_context()
        conn = httplib.HTTPSConnection(url, context=context)

Maybe someone more experienced will help?

pravsripad avatar Nov 02 '15 12:11 pravsripad