diff options
Diffstat (limited to 'dev-python/xmpppy/files')
-rw-r--r-- | dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch b/dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch new file mode 100644 index 000000000000..a39af1821fdb --- /dev/null +++ b/dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch @@ -0,0 +1,28 @@ +Taken from https://bugs.gentoo.org/show_bug.cgi?id=535758 +Kudos to Anton Bolshakov <blshkv@pentoo.ch> for this patch + +--- xmpp/transports.py.orig 2015-01-05 15:41:23.000000000 +0800 ++++ xmpp/transports.py 2015-01-06 15:52:25.916240681 +0800 +@@ -27,7 +27,7 @@ + Also exception 'error' is defined to allow capture of this module specific exceptions. + """ + +-import socket,select,base64,dispatcher,sys ++import socket,ssl,select,base64,dispatcher,sys + from simplexml import ustr + from client import PlugIn + from protocol import * +@@ -314,9 +314,10 @@ + """ Here we should switch pending_data to hint mode.""" + tcpsock=self._owner.Connection + warnings.filterwarnings("ignore", "socket\.ssl.*ssl\.wrap_socket", DeprecationWarning) +- tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None) +- tcpsock._sslIssuer = tcpsock._sslObj.issuer() +- tcpsock._sslServer = tcpsock._sslObj.server() ++ tcpsock._sslObj = ssl.wrap_socket(tcpsock._sock, None, None) ++ tcpsock._sslIssuer = tcpsock._sslObj.getpeercert().get('issuer') ++ tcpsock._sslServer = tcpsock._sslObj.getpeercert().get('server') ++ + tcpsock._recv = tcpsock._sslObj.read + tcpsock._send = tcpsock._sslObj.write + |