•   over 9 years ago

SSL problem when testing sdk for python

Hello, I'm trying evernote sdk for python.
When I try to run sample EDAMTest.py I get an SSL error protocol: ssl.SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol
Here is the full ouput: http://pastebin.com/UYezEife

I'm using python 2.6 and i also runned it with python 2.7 with the same results. I'm running it on ArchLinux.

Any clues?? Thanks in advance


  • Manager   •   over 9 years ago

    @Matias M - For the name of the service - make sure you have "www.evernote.com" - and NOT "evernote.com"

    We made changes recently for authentication that could have affected this. Besides this, perhaps try a different linux stack - server configurations often directly affect these things.

  •   •   over 9 years ago

    Ran into the same problem, for me this was caused by Ubuntu 12.04's openssl trying to establish a TLSv1.1 connection even though python is requesting a SSLv23 connection.


    And the Evernote-servers just don't speak TLSv1.1 yet and immediatly end the connection if you try to.

    My workaround for the moment was to recompile Ubuntu's package python2.7 with the following patch.

    --- python2.7-2.7.3/Modules/_ssl.c 2012-04-10 01:07:33.000000000 +0200
    +++ python2.7-2.7.3.patched/Modules/_ssl.c 2012-06-05 19:51:36.181653627 +0200
    @@ -309,7 +309,7 @@
    self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
    else if (proto_version == PY_SSL_VERSION_SSL23)
    - self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
    + self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */

    if (self->ctx == NULL) {

Comments are closed.