#1140931 twisted: Tests fail with pyopenssl 26.3.0: module 'OpenSSL.crypto' has no attribute 'X509Req' #1140931
- Package:
- src:twisted
- Source:
- src:twisted
- Submitter:
- Andrey Rakhmatullin
- Date:
- 2026-06-29 10:37:02 UTC
- Severity:
- normal
- Tags:
Likely fixed by https://github.com/twisted/twisted/pull/12661 (theoretically
more changes may be needed, I didn't check if the upstream CI runs with this
pyopenssl).
pyopenssl 26.3.0 is available in experimental.
[ERROR]
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/foolscap/appserver/cli.py", line 124, in
run
a = AppServer(basedir, stdout)
File "/usr/lib/python3/dist-packages/foolscap/appserver/server.py", line 74,
in __init__
self.tub = Tub(certFile=os.path.join(basedir, "tub.pem"))
File "/usr/lib/python3/dist-packages/foolscap/pb.py", line 192, in __init__
self.setupEncryptionFile(certFile)
File "/usr/lib/python3/dist-packages/foolscap/pb.py", line 204, in
setupEncryptionFile
self.setupEncryption(certData)
File "/usr/lib/python3/dist-packages/foolscap/pb.py", line 215, in
setupEncryption
cert = self.createCertificate()
File "/usr/lib/python3/dist-packages/foolscap/pb.py", line 419, in
createCertificate
return crypto.createCertificate()
File "/usr/lib/python3/dist-packages/foolscap/crypto.py", line 77, in
createCertificate
req = keypair.certificateRequest(dn, digestAlgorithm="sha256")
File "/usr/lib/python3/dist-packages/twisted/internet/_sslverify.py", line
731, in certificateRequest
return self.requestObject(distinguishedName, digestAlgorithm).dump(format)
File "/usr/lib/python3/dist-packages/twisted/internet/_sslverify.py", line
717, in requestObject
req = crypto.X509Req()
File "/usr/lib/python3/dist-packages/cryptography/utils.py", line 76, in
__getattr__
obj = getattr(self._module, name)
builtins.AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
Hello, Bug #1140931 in twisted reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/python-team/packages/twisted/-/commit/31083f4b69d740a9d029f701a9d8bb53d493d6f8 ------------------------------------------------------------------------ Replace OpenSSL.crypto.X509Req with pyca/cryptography CSR Closes: #1140931 ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/1140931
We believe that the bug you reported is fixed in the latest version of
twisted, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1140931@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated twisted package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 29 Jun 2026 11:22:56 +0100
Source: twisted
Architecture: source
Version: 26.4.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Closes: 1140931
Changes:
twisted (26.4.0-3) unstable; urgency=medium
.
* Replace OpenSSL.crypto.X509Req with pyca/cryptography CSR (closes:
#1140931).
* Drop "Priority: optional", default as of dpkg-dev 1.22.13.
* Standards-Version: 4.7.4.
Checksums-Sha1:
2764ad5208e281bf51f4f25e853f163cd5a393b9 3020 twisted_26.4.0-3.dsc
686e878521b993c1dfd8f52f74d1edfa1a310eeb 30768 twisted_26.4.0-3.debian.tar.xz
c46807f568dc4171d792f9dba9c28acca366c415 7066252 twisted_26.4.0-3.git.tar.xz
32e00e960f805c10ded335af09983005b74560bf 17500 twisted_26.4.0-3_source.buildinfo
Checksums-Sha256:
3f3fdd4d9f934cab10b11248ee01b21e1356a2da818ac1690a2955b2af093e95 3020 twisted_26.4.0-3.dsc
201fc889ba0379ba997addbaabb0c264e3da8e9439b4066cd03a7d40e267dd97 30768 twisted_26.4.0-3.debian.tar.xz
f090c561b11f1ff78e44346b16ce2a40e2e0d25cf02c2f2865ffd9f2fa387242 7066252 twisted_26.4.0-3.git.tar.xz
2d35c0422f6109039bc5de8d281aa9d3d10e5b9f0bfe97b2d63fb2d57ba328e2 17500 twisted_26.4.0-3_source.buildinfo
Files:
f25a275b6fb65bb4c6df07e5ed101d49 3020 python optional twisted_26.4.0-3.dsc
c3695739ff7d63509928da89ba86a0ce 30768 python optional twisted_26.4.0-3.debian.tar.xz
e7a65ab11260882bc7557fa600ea40a2 7066252 python None twisted_26.4.0-3.git.tar.xz
703505746c25c0899a88e4283ee2c28a 17500 python optional twisted_26.4.0-3_source.buildinfo
Git-Tag-Info: tag=b3d100c72669ffd6f825207079083700fff00b00 fp=ac0a4ff12611b6fccf01c111393587d97d86500b
Git-Tag-Tagger: Colin Watson <cjwatson@debian.org>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmpCR9sACgkQYG0ITkaD
wHmm7RAA2vw+RGfJGKWgQ7KZi3/cQQHWljNUQR3dOawBxmmG/xFFMqvwm8oduOYb
WIjWpaeRYXiJAPu44yY5gWRf1z1SMFzsyOiDji7rivo6VQCzLTxYR7LTxrrpaiOi
lM+pwwugVul6SWaQSh8oX+Kl25Mj9AC401112ZPT+xANmvW72oTmvPtC2fFWcfZM
Zt3sZiecRw2iD+cCMLCyNff6r+jZKBE1nyyKTrG26tDqtlwyfQ3tI62TTW01KHPO
gMX/xTdbMmCP3XFVuwvMHKnIShG40t1r+h1uAoVzP1nOwpuwYpR0U179kSSBuQ4r
fILmHUsPWwRP4i8mS67JLVT9r3aDzR9UkhuVh9DALbK7x7AK+pZZVr7+HVdOAWGZ
S8VBlnSl0wAn+C2DHifj/3ncbGW5tnLvXT6xp2P+gdje76/DRilDMe6BHaWS41fm
DpoT5OWcvfJMec64usCO/O5HfXGITYjC2e42NZRVTBksYEm1nj0D9tM4AHKH9sn7
vaA3rjDq5tV0wezEMiFjsxe8z7VNmbOU2tRdn53jnnfFLTOaClHSLV4IGx7UOqBp
0FsiKqNqk8Y/PkwHoIdKNUtmu7IM2TmrXEtW2pkGi3h2NeK2+RTcLsv/w5/57eg9
C8mZIOAiCvgnjj64rLfK0DxPusAjzLrXQBfzuEVWVvDF/X7l6oI=
=N44G
-----END PGP SIGNATURE-----