Re: Twisted Conch SSL session Key from Request

Glyph Lefkowitz <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <[email protected]>
On Sep 22, 2011, at 12:17 PM, Caleb P. Burns wrote:

> Is it possible to retrieve the SSL session or master key from a `twisted.web.http.Request` instance? I want to use it along with other data to generate a hash-keyed message authentication code (HMAC).

I think you might be a little confused: Conch speaks SSH, not TLS; these are different protocols.  If you're interested in using pyOpenSSL APIs to access information about your SSH session, you can probably get to them via the request's transport's .getHandle() method, which will give you a pyOpenSSL 'Connection' object in the current implementation.  (This is not a terribly clean access method, and it might change in the future, not too much is guaranteed about 'getHandle()'. Unfortunately Twisted doesn't really wrap the parts of SSL it sounds like you're interested in.)

-glyph
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.