From lozierd at comcast.net Wed Jan 19 02:23:49 2011 From: lozierd at comcast.net (lozierd at comcast.net) Date: Wed, 19 Jan 2011 01:23:49 +0000 (UTC) Subject: [pyOpenSSL] Getting a pyOpenSSL client to use SSL session resume. In-Reply-To: <73105171.1732372.1295400129085.JavaMail.root@sz0162a.westchester.pa.mail.comcast.net> Message-ID: <439362674.1732473.1295400229273.JavaMail.root@sz0162a.westchester.pa.mail.comcast.net> I've been trying with no success to get my pyOpenSSL client to use SSL session resume when making several connections sucessively (http requests) to a Tomcat application server. I'm pretty sure everything is fine on the server end since I have several other clients making the same requests and they are all able to do session resume. For the first connection I create the ssl context. Then I just reuse it for subsequent requests # Just do this for the first and then reuse the context for subsequent connections. ssl_context = SSL.Context(SSL.SSLv23_METHOD) ssl_context.set_options(SSL.OP_NO_SSLv2) # Do this for every connection sock = socket.create_connection((self.host, self.port), self.timeout) sslconn = SSL.Connection(ssl_context, sock) sslconn.set_connect_state() sslconn.do_handshake() Thanks in advance, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: