diff options
Diffstat (limited to 'src/common/xmpp/tls_nb.py')
-rw-r--r-- | src/common/xmpp/tls_nb.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/xmpp/tls_nb.py b/src/common/xmpp/tls_nb.py index 52a429cc4..cde9d4c43 100644 --- a/src/common/xmpp/tls_nb.py +++ b/src/common/xmpp/tls_nb.py @@ -1,6 +1,6 @@ ## tls_nb.py ## based on transports_nb.py -## +## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov <dkirov@gmail.com> ## modified by Tomas Karasek <tom.to.the.k@gmail.com> @@ -228,7 +228,7 @@ class StdlibSSLWrapper(SSLWrapper): class NonBlockingTLS(PlugIn): ''' TLS connection used to encrypts already estabilished tcp connection. - + Can be plugged into NonBlockingTCP and will make use of StdlibSSLWrapper or PyOpenSSLWrapper. ''' @@ -243,10 +243,10 @@ class NonBlockingTLS(PlugIn): self.mycerts = mycerts # from ssl.h (partial extract) - ssl_h_bits = { "SSL_ST_CONNECT": 0x1000, "SSL_ST_ACCEPT": 0x2000, - "SSL_CB_LOOP": 0x01, "SSL_CB_EXIT": 0x02, - "SSL_CB_READ": 0x04, "SSL_CB_WRITE": 0x08, - "SSL_CB_ALERT": 0x4000, + ssl_h_bits = { "SSL_ST_CONNECT": 0x1000, "SSL_ST_ACCEPT": 0x2000, + "SSL_CB_LOOP": 0x01, "SSL_CB_EXIT": 0x02, + "SSL_CB_READ": 0x04, "SSL_CB_WRITE": 0x08, + "SSL_CB_ALERT": 0x4000, "SSL_CB_HANDSHAKE_START": 0x10, "SSL_CB_HANDSHAKE_DONE": 0x20} def plugin(self, owner): @@ -281,7 +281,7 @@ class NonBlockingTLS(PlugIn): typedict = {OpenSSL.crypto.TYPE_RSA: "RSA", OpenSSL.crypto.TYPE_DSA: "DSA"} print >> stream, "PKey bits:", pkey.bits() - print >> stream, "PKey type: %s (%d)" % (typedict.get(pkey.type(), + print >> stream, "PKey type: %s (%d)" % (typedict.get(pkey.type(), "Unknown"), pkey.type()) def _startSSL(self): |