Script tls_nb_py_orig :: Class NonBlockingTLS
[hide private]
[frames] | no frames]

Class NonBlockingTLS


TLS connection used to encrypts already estabilished tcp connection

Can be plugged into NonBlockingTCP and will make use of StdlibSSLWrapper or PyOpenSSLWrapper.

Instance Methods [hide private]
 
__init__(self, cacerts, mycerts)
 
plugin(self, owner)
Use to PlugIn TLS into transport and start establishing immediately. Returns True if TLS/SSL was established correctly, otherwise False
 
_dumpX509(self, cert, stream=sys.stderr)
 
_dumpX509Name(self, name, stream=sys.stderr)
 
_dumpPKey(self, pkey, stream=sys.stderr)
 
_startSSL(self)
Immediatedly switch socket to TLS mode. Used internally
 
_load_cert_file(self, cert_path, cert_store, logg=True)
 
_startSSL_pyOpenSSL(self)
 
_startSSL_stdlib(self)
 
_ssl_verify_callback(self, sslconn, cert, errnum, depth, ok)

Inherited from nbxmpp.plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from nbxmpp.plugin.PlugIn: get_instance

Class Variables [hide private]
  ssl_h_bits = {"SSL_ST_CONNECT": 0x1000, "SSL_ST_ACCEPT": 0x200...
Method Details [hide private]

__init__(self, cacerts, mycerts)
(Constructor)

 
Parameters:
  • cacerts - path to pem file with certificates of known XMPP servers
  • mycerts - path to pem file with certificates of user trusted servers
Overrides: nbxmpp.plugin.PlugIn.__init__

plugin(self, owner)

 
Use to PlugIn TLS into transport and start establishing immediately. Returns True if TLS/SSL was established correctly, otherwise False

_dumpX509(self, cert, stream=sys.stderr)

 

_dumpX509Name(self, name, stream=sys.stderr)

 

_dumpPKey(self, pkey, stream=sys.stderr)

 

_startSSL(self)

 
Immediatedly switch socket to TLS mode. Used internally

_load_cert_file(self, cert_path, cert_store, logg=True)

 

_startSSL_pyOpenSSL(self)

 

_startSSL_stdlib(self)

 

_ssl_verify_callback(self, sslconn, cert, errnum, depth, ok)

 

Class Variable Details [hide private]

ssl_h_bits

Value:
{"SSL_ST_CONNECT": 0x1000, "SSL_ST_ACCEPT": 0x2000, "SSL_CB_LOOP": 0x0\
1, "SSL_CB_EXIT": 0x02, "SSL_CB_READ": 0x04, "SSL_CB_WRITE": 0x08, "SS\
L_CB_ALERT": 0x4000, "SSL_CB_HANDSHAKE_START": 0x10, "SSL_CB_HANDSHAKE\
_DONE": 0x20}