the fast, reliable localhost tunneling solution


PageKite on Synology (DS107) - SSL problems

By Bjarni Rúnar Einarsson 2011-06-08, 19:49

Comments

  1. remke said on 2011-06-08, 13:08
    Using pagekit on Synology (DS107) gives me some problems..

    Server response parsing failed: Neither pyOpenSSL nor python 2.6+ ssl modules found
    Python 2.5.5 (r255:77872, May 14 2010, 02:24:16)

    is it possible to change the python code to use the build in ssl ?
    http://martin.piware.de/

    Creating an HTTPS server in Python
    JAN4
    Gepostet von pitti in ubuntu | 1 Kommentar
    For a test suite I need to create a local SSL-enabled HTTPS server in my Python project. I googled around and found various recipes using pyOpenSSL, but all of those are quite complicated, and I didn’t even get the referenced one to work.
    Also, Python has shipped its own built-in SSL module for quite a while. After reading some docs and playing around, I eventually got it to work with a remarkably simple piece of code using the builtin ssl module:
    import BaseHTTPServer, SimpleHTTPServer
    import ssl

    httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
    httpd.socket = ssl.wrap_socket (httpd.socket, certfile='path/to/localhost.pem', server_side=True)
    httpd.serve_forever()
    (I use port 4443 so that I can run the tests as normal user; the usual port 443 requires root privileges).
    Way to go, Python!
    Permalink
  2. Bjarni Rúnar Einarsson said on 2011-06-08, 13:35
    Hi remke,

    Pagekite.py will use the native Python SSL modules if they are present. If they aren't, there's not much we can do - but even without SSL support, pagekite.py should be able to connect to a front-end, so I am not sure exactly what is causing problems for you.

    I recommend you join us on the chat so we can go over your problems live.
    Permalink
  3. remke said on 2011-06-08, 14:48
    sorry, my errror ...

    I had to install:
    py25-openssl
    (ipkg install <package>

    grz
    ~remke

    ? which chat / irc server/channel
    Permalink
  4. Bjarni Rúnar Einarsson said on 2011-06-08, 16:43
    #pagekite on freenode. Or try see here: http://pagekite.net/support/chat/
    Permalink

Leave a comment

( (Please leave these blank: )

We use Gravatar for commenter's photos. Get your own, it's free!