[Twisted-web] Twisted Conch SSL session Key from Request

Glyph Lefkowitz glyph at twistedmatrix.com
Thu Sep 22 14:51:26 EDT 2011


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


More information about the Twisted-web mailing list