pagekite ssl support question

79 views
Skip to first unread message

Ram

unread,
Jul 13, 2012, 12:15:19 PM7/13/12
to pagekite...@googlegroups.com

I am running a https server and when i use twisted.getPage to get a page, it gives me a ssl handshake error. When I use a regular firefox/chrome, it goes thru. Sometimes getPage goes thru, after I've used firefox to get to the server. Here are more details on the problem: http://twistedmatrix.com/pipermail/twisted-python/2012-July/025751.html

I thought it might be happening because of pagekite. I did remove nose from the equation, and the error remains. On localhost, the error isn't there. Any thoughts? [I'm using pagekite latest version]. Note that getPage() function in twisted is strict on checking ssl support (and its bugs I hear).

Thanks,
--Ram

Bjarni Rúnar Einarsson

unread,
Jul 13, 2012, 12:26:38 PM7/13/12
to pagekite...@googlegroups.com
This is probably caused by the fact that PageKite relies on the TLS
SNI extension to correctly route end-to-end HTTPS connections.

Quite a few APIs and libraries still do not do SNI correctly, which
means PageKite doesn't really know what to do with the incoming
request and will have to make an "educated guess". This can very
easily lead to the behavior you are seeing.

There are some workarounds; if you know you are connecting to a site
over PageKite, the most reliable way to make this work is to send an
HTTP CONNECT before you perform the SSL handshake.

- Bjarni
--
Bjarni R. Einarsson
Founder, lead developer of PageKite.

Make localhost servers visible to the world: https://pagekite.net/

Ram

unread,
Jul 13, 2012, 4:48:01 PM7/13/12
to pagekite...@googlegroups.com

Thanks for the quick reply Bjarni. 

By any chance do you know which python packages below can do TLS SNI well?

urllib urllib2 urllib3 requests

Whats the easiest way to do http CONNECT from python? Any pointers to sample code somewhere?
Reply all
Reply to author
Forward
0 new messages