diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2015-11-10 14:10:10 +0300 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2015-11-10 14:10:10 +0300 |
commit | 2cefed6f6c2557c7e4c9ff72974534fd374c8920 (patch) | |
tree | 02ff7c022ef6c8ee869fa3c0ebfc9517c3140831 | |
parent | Sanitize virtual namespace of python packages (diff) | |
download | gentoo-2cefed6f6c2557c7e4c9ff72974534fd374c8920.tar.gz gentoo-2cefed6f6c2557c7e4c9ff72974534fd374c8920.tar.bz2 gentoo-2cefed6f6c2557c7e4c9ff72974534fd374c8920.zip |
dev-python/xmpppy: fix working with SSL fields
Suggested-by: Anton Bolshakov <blshkv@pentoo.ch>
Gentoo-Bug: 535758
Package-Manager: portage-2.2.23
-rw-r--r-- | dev-python/xmpppy/files/xmpppy-0.5.0_rc1-ssl_fields.patch | 28 | ||||
-rw-r--r-- | dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild | 1 |
2 files changed, 29 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 + diff --git a/dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild b/dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild index 28e388b68587..31a6b8a91a54 100644 --- a/dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild +++ b/dev-python/xmpppy/xmpppy-0.5.0_rc1-r2.ebuild @@ -31,6 +31,7 @@ S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}/${PN}-hashlib_ssl_deprecation.patch" + "${FILESDIR}/${P}-ssl_fields.patch" ) python_install_all() { |