diff options
author | schnoebe <schnoebe> | 2015-11-08 22:02:57 +0000 |
---|---|---|
committer | schnoebe <schnoebe> | 2015-11-08 22:02:57 +0000 |
commit | ec662b4b9b85105c55d800ad7eafc82f4751edd8 (patch) | |
tree | b1916b9aaf78ec870008c32256cd28b248e6cb8f /chat | |
parent | 48d897786da28653f60f5be99dce472f1b569f4b (diff) | |
download | pkgsrc-ec662b4b9b85105c55d800ad7eafc82f4751edd8.tar.gz |
patch xmpp/transport.py to use the more modern SSL/TLS interfaces.
Diffstat (limited to 'chat')
-rw-r--r-- | chat/py-xmpppy/Makefile | 4 | ||||
-rw-r--r-- | chat/py-xmpppy/distinfo | 3 | ||||
-rw-r--r-- | chat/py-xmpppy/patches/patch-xmpp_transports.py | 33 |
3 files changed, 37 insertions, 3 deletions
diff --git a/chat/py-xmpppy/Makefile b/chat/py-xmpppy/Makefile index 491a23aa824..633b075b0fc 100644 --- a/chat/py-xmpppy/Makefile +++ b/chat/py-xmpppy/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2015/01/12 08:53:37 wiz Exp $ +# $NetBSD: Makefile,v 1.9 2015/11/08 22:02:57 schnoebe Exp $ DISTNAME= xmpppy-0.5.0rc1 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= chat python MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xmpppy/} diff --git a/chat/py-xmpppy/distinfo b/chat/py-xmpppy/distinfo index 214964fa509..b90d992f78e 100644 --- a/chat/py-xmpppy/distinfo +++ b/chat/py-xmpppy/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.2 2015/11/03 01:20:23 agc Exp $ +$NetBSD: distinfo,v 1.3 2015/11/08 22:02:57 schnoebe Exp $ SHA1 (xmpppy-0.5.0rc1.tar.gz) = 9cff61d0133857f1e97bca615763989374b2e045 RMD160 (xmpppy-0.5.0rc1.tar.gz) = 5a62b9de440d05d423be9f74ca437ff1f874b2fc SHA512 (xmpppy-0.5.0rc1.tar.gz) = 7fe91ff313533a419e125bb69163dfb122723e67ca70feab00748b5deafc0c99aa002cbebf0f89b8bc7ce465bb2c775ab98509761af07d90295bc1e9c50eee23 Size (xmpppy-0.5.0rc1.tar.gz) = 84996 bytes SHA1 (patch-xmpp_debug.py) = a410b7abd534f37bba583ca9f15bf05252bc55a0 +SHA1 (patch-xmpp_transports.py) = 12b5d827a9a70374e3c7ad329b9f1c44d27285a0 diff --git a/chat/py-xmpppy/patches/patch-xmpp_transports.py b/chat/py-xmpppy/patches/patch-xmpp_transports.py new file mode 100644 index 00000000000..c3040b6da9c --- /dev/null +++ b/chat/py-xmpppy/patches/patch-xmpp_transports.py @@ -0,0 +1,33 @@ +$NetBSD: patch-xmpp_transports.py,v 1.1 2015/11/08 22:02:57 schnoebe Exp $ + +Play better with python's after 2.6. + +Change how we're creating the SSL object/socket. +Change how we're getting information about the SSL/TLS connection. + +Changes taken from debian patch for the same purpose. + +--- xmpp/transports.py.orig 2009-04-07 08:34:09.000000000 +0000 ++++ xmpp/transports.py +@@ -27,7 +27,7 @@ Transports are stackable so you - f.e. T + 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 @@ class TLS(PlugIn): + """ 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 + |