pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/chat/py-xmpppy
Module Name: pkgsrc
Committed By: gdt
Date: Fri Nov 22 13:45:36 UTC 2024
Modified Files:
pkgsrc/chat/py-xmpppy: Makefile distinfo
Added Files:
pkgsrc/chat/py-xmpppy/patches: patch-xmpp_transports.py
Log Message:
chat/py-xmppy: Adapt to python 3.12+ ssl interface
Upstream code used a deprecated, now withdrawn, interface. Apply a
patch from an usptream PR.
NB: This explicitly disables certification validation, but that
matches the previous behavior.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/chat/py-xmpppy/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/chat/py-xmpppy/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/chat/py-xmpppy/patches/patch-xmpp_transports.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/chat/py-xmpppy/Makefile
diff -u pkgsrc/chat/py-xmpppy/Makefile:1.31 pkgsrc/chat/py-xmpppy/Makefile:1.32
--- pkgsrc/chat/py-xmpppy/Makefile:1.31 Fri Aug 2 11:27:21 2024
+++ pkgsrc/chat/py-xmpppy/Makefile Fri Nov 22 13:45:36 2024
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.31 2024/08/02 11:27:21 gdt Exp $
+# $NetBSD: Makefile,v 1.32 2024/11/22 13:45:36 gdt Exp $
DISTNAME= xmpppy-0.7.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= chat python
MASTER_SITES= ${MASTER_SITE_GITHUB:=xmpppy/}
GITHUB_PROJECT= xmpppy
Index: pkgsrc/chat/py-xmpppy/distinfo
diff -u pkgsrc/chat/py-xmpppy/distinfo:1.9 pkgsrc/chat/py-xmpppy/distinfo:1.10
--- pkgsrc/chat/py-xmpppy/distinfo:1.9 Sun Apr 10 18:49:25 2022
+++ pkgsrc/chat/py-xmpppy/distinfo Fri Nov 22 13:45:36 2024
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.9 2022/04/10 18:49:25 gdt Exp $
+$NetBSD: distinfo,v 1.10 2024/11/22 13:45:36 gdt Exp $
BLAKE2s (xmpppy-0.7.1.tar.gz) = e394d2554c38736ed35eb93823e11b02a87f719ab6e980d88327326b65660286
SHA512 (xmpppy-0.7.1.tar.gz) = d7dc536282c5214007037bacc0c2d24bc64d1ea10441472a5ab23b14fe076b65f945e966a6255519e8ddca41c6d4c343ebe99b50bf1764f6775e58a3ab1b2266
Size (xmpppy-0.7.1.tar.gz) = 191428 bytes
SHA1 (patch-xmpp_debug.py) = a410b7abd534f37bba583ca9f15bf05252bc55a0
+SHA1 (patch-xmpp_transports.py) = 67884d31f7929a8a5db29169025985b31e73aa53
Added files:
Index: pkgsrc/chat/py-xmpppy/patches/patch-xmpp_transports.py
diff -u /dev/null pkgsrc/chat/py-xmpppy/patches/patch-xmpp_transports.py:1.3
--- /dev/null Fri Nov 22 13:45:36 2024
+++ pkgsrc/chat/py-xmpppy/patches/patch-xmpp_transports.py Fri Nov 22 13:45:36 2024
@@ -0,0 +1,35 @@
+$NetBSD: patch-xmpp_transports.py,v 1.3 2024/11/22 13:45:36 gdt Exp $
+
+Adapt to ssl usage in python 3.12 and up.
+
+Taken from:
+ https://github.com/xmpppy/xmpppy/pull/70/
+
+NB: This patch disables validation entirely, matching the previous
+behavior. This is a bug and it is \todo to to enable validation.
+ https://github.com/xmpppy/xmpppy/issues/71
+
+Comment for after validation is enabled:
+
+This patch enables check_hostname, and in theory that should result in
+certificate validation using the system's configured trust anchors,
+and also hostname matching. Perhaps this is a behavior change from
+before, but if so it is a bugfix.
+
+--- xmpp/transports.py.orig 2022-04-10 18:25:44.000000000 +0000
++++ xmpp/transports.py
+@@ -383,8 +383,13 @@ class TLS(PlugIn):
+ def _startSSL(self):
+ """ Immidiatedly switch socket to TLS mode. Used internally."""
+ """ Here we should switch pending_data to hint mode."""
++ context=ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
++ # \todo Fix this after understanding validation a bit better
++ context.check_hostname = False
++ context.verify_mode = ssl.CERT_NONE
++
+ tcpsock=self._owner.Connection
+- tcpsock._sslObj = ssl.wrap_socket(tcpsock._sock, None, None)
++ tcpsock._sslObj = context.wrap_socket(tcpsock._sock, server_hostname=self._owner.Server)
+ tcpsock._sslIssuer = tcpsock._sslObj.getpeercert().get('issuer')
+ tcpsock._sslServer = tcpsock._sslObj.getpeercert().get('server')
+ tcpsock._recv = tcpsock._sslObj.read
Home |
Main Index |
Thread Index |
Old Index