Home | Trees | Index | Help |
|
---|
Package pyxmpp :: Module streamtls :: Class StreamTLSMixIn |
|
Stream
Mix-in class providing TLS support for an XMPP stream. :Ivariables: - `tls`: TLS connection object.
Method Summary | |
---|---|
Initialize TLS support of a Stream object :Parameters: - `tls_settings`: settings for StartTLS. | |
Get the TLS connection object for the stream. | |
Process incoming StartTLS related element of <stream:features/>. | |
Update the <features/> with StartTLS feature. | |
Initiate TLS connection. | |
Same as `Stream.process` but assume `self.lock` is acquired. | |
Process incoming stream element. | |
Process stream element in the TLS namespace. | |
Read data pending on the stream socket and pass it to the parser. | |
Read data pending on the stream socket and pass it to the parser. | |
Request a TLS-encrypted connection. | |
Reset `StreamTLSMixIn` object state making it ready to handle new connections. | |
Certificate verification callback for TLS connections. | |
Same as `Stream.write_raw` but assume `self.lock` is acquired. |
Method Details |
---|
__init__(self,
tls_settings=None)
|
get_tls_connection(self)Get the TLS connection object for the stream. :return: `self.tls` |
_handle_tls_features(self)Process incoming StartTLS related element of <stream:features/>. [initiating entity only] The received features node is available in `self.features`. |
_make_stream_tls_features(self, features)Update the <features/> with StartTLS feature. [receving entity only] :Parameters: - `features`: the <features/> element of the stream. :Types: - `features`: `libxml2.xmlNode` :returns: updated <features/> element node. :returntype: `libxml2.xmlNode` |
_make_tls_connection(self)Initiate TLS connection. [initiating entity only] |
_process(self)Same as `Stream.process` but assume `self.lock` is acquired. |
_process_node_tls(self, xmlnode)Process incoming stream element. Pass it to _process_tls_node if it is in TLS namespace. :raise StreamEncryptionRequired: if encryption is required by current configuration, it is not active and the element is not in the TLS namespace nor in the stream namespace. :return: `True` when the node was recognized as TLS element. :returntype: `bool` |
_process_tls_node(self, xmlnode)Process stream element in the TLS namespace. :Parameters: - `xmlnode`: the XML node received |
_read(self)Read data pending on the stream socket and pass it to the parser. |
_read_tls(self)Read data pending on the stream socket and pass it to the parser. |
_request_tls(self)Request a TLS-encrypted connection. [initiating entity only] |
_reset_tls(self)Reset `StreamTLSMixIn` object state making it ready to handle new connections. |
_tls_verify_callback(self, ssl_ctx_ptr, x509_ptr, errnum, depth, ok)Certificate verification callback for TLS connections. :Parameters: - `ssl_ctx_ptr`: TLS context pointer. - `x509_ptr`: X.509 certificate pointer. - `errnum`: error number. - `depth`: verification depth. - `ok`: current verification result. :return: computed verification result. |
_write_raw(self, data)Same as `Stream.write_raw` but assume `self.lock` is acquired. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed May 31 22:37:02 2006 | http://epydoc.sf.net |