diff options
author | Bartłomiej Piotrowski | 2018-01-06 20:23:28 +0100 |
---|---|---|
committer | Bartłomiej Piotrowski | 2018-01-06 20:23:28 +0100 |
commit | 0b00592d16f3d8738f3a2f5daed431483da6dcaa (patch) | |
tree | 0c678335cd4e52268bff12f9068f1733a8eb6197 /ssl.patch | |
download | aur-xmpppy.tar.gz |
Import from official repositories
Diffstat (limited to 'ssl.patch')
-rw-r--r-- | ssl.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ssl.patch b/ssl.patch new file mode 100644 index 000000000000..915602dc23e5 --- /dev/null +++ b/ssl.patch @@ -0,0 +1,25 @@ +diff -wbBur xmpppy-0.5.0rc1/xmpp/transports.py xmpppy-0.5.0rc1.q/xmpp/transports.py +--- xmpppy-0.5.0rc1/xmpp/transports.py 2009-04-07 12:34:09.000000000 +0400 ++++ xmpppy-0.5.0rc1.q/xmpp/transports.py 2015-05-08 13:06:03.049252065 +0300 +@@ -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 * +@@ -312,9 +312,9 @@ + """ Immidiatedly switch socket to TLS mode. Used internally.""" + """ Here we should switch pending_data to hint mode.""" + tcpsock=self._owner.Connection +- 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 + |