Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get to the SSL/TLS internals from Python?
    primarykey
    data
    text
    <p>I am implementing the XMPP protocol in Python (2.7 and 3.2) and I found one important thing stopping me from making the implementation fully compliant. </p> <p>The current specification (<a href="http://xmpp.org/rfcs/rfc6120.html" rel="noreferrer">RFC 6120</a>) requires implementation of the SCRAM-SHA-1-PLUS SASL mechanism (<a href="http://tools.ietf.org/html/rfc5802" rel="noreferrer">RFC 5802</a>), which, in turn, requires the 'tls-unique' channel binding (<a href="http://tools.ietf.org/html/rfc5929" rel="noreferrer">RFC 5929</a>), which is defined as:</p> <blockquote> <p>Description: The first TLS Finished message sent (note: the Finished struct, not the TLS record layer message containing it) in the most recent TLS handshake of the TLS connection being bound to</p> </blockquote> <p>Python doesn't seem to provide this piece of information directly, but I know it may be obtained via the OpenSSL API, used internally by Python.</p> <p>Is there any way to get the 'SSL' pointer for a SSL socket wrapper, so I could use it via the ctypes module or from my own extension module? I cannot find anything like that with the header files installed with Python.</p> <p>Is there any third-party TLS module for Python providing such API, but keeping the general Python SSL API?</p> <p>Or is the only way to do it, to extract the SSL code from Python and bundle a patched copy of it with my own package?</p> <p><strong>Update:</strong> I have created a Python feature request for this functionality: <a href="http://bugs.python.org/issue12551" rel="noreferrer">http://bugs.python.org/issue12551</a> I am still looking for a 'ready to use' solution, though.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload