#1143371 python-pysaml2: FTBFS: E AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'

#1143371#5
Date:
2026-08-01 22:37:45 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-pysaml2, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
make: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
dh clean --buildsystem=pybuild --with python3,sphinxdoc
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
make[1]: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
rm -rf build src/*.egg-info .pytest_cache tests/subject.db.db tests/subject_data.db.db eptid
find . -iname '*.pyc' -delete
for i in $(find . -type d -iname __pycache__) ; do rm -rf $i ; done
dh_auto_clean
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild

[... snipped ...]

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <module 'OpenSSL.crypto' from '/usr/lib/python3/dist-packages/OpenSSL/crypto.py'>
name = 'X509Req'

    def __getattr__(self, name: str) -> typing.Any:
/usr/lib/python3/dist-packages/cryptography/utils.py:76: AttributeError
                                 ^^^^^^^^^^^^^^^

tests/test_51_client.py:2140:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_51_client.py:85: in generate_cert
    req_cert_str, req_key_str = osw.create_certificate(cert_info, request=True, sn=sn, key_length=2048)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
saml2/cert.py:141: in create_certificate
    cert = crypto.X509Req()
           ^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <module 'OpenSSL.crypto' from '/usr/lib/python3/dist-packages/OpenSSL/crypto.py'>
name = 'X509Req'

    def __getattr__(self, name: str) -> typing.Any:
/usr/lib/python3/dist-packages/cryptography/utils.py:76: AttributeError
                                 ^^^^^^^^^^^^^^^

tests/test_51_client.py:2249:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_51_client.py:85: in generate_cert
    req_cert_str, req_key_str = osw.create_certificate(cert_info, request=True, sn=sn, key_length=2048)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
saml2/cert.py:141: in create_certificate
    cert = crypto.X509Req()
           ^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <module 'OpenSSL.crypto' from '/usr/lib/python3/dist-packages/OpenSSL/crypto.py'>
name = 'X509Req'

    def __getattr__(self, name: str) -> typing.Any:
/usr/lib/python3/dist-packages/cryptography/utils.py:76: AttributeError
                                                     ^^^^^^^^^^^^^^^

tests/test_51_client.py:2288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_51_client.py:85: in generate_cert
    req_cert_str, req_key_str = osw.create_certificate(cert_info, request=True, sn=sn, key_length=2048)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
saml2/cert.py:141: in create_certificate
    cert = crypto.X509Req()
           ^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <module 'OpenSSL.crypto' from '/usr/lib/python3/dist-packages/OpenSSL/crypto.py'>
name = 'X509Req'

    def __getattr__(self, name: str) -> typing.Any:
/usr/lib/python3/dist-packages/cryptography/utils.py:76: AttributeError
                                 ^^^^^^^^^^^^^^^

tests/test_51_client.py:2369:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_51_client.py:85: in generate_cert
    req_cert_str, req_key_str = osw.create_certificate(cert_info, request=True, sn=sn, key_length=2048)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
saml2/cert.py:141: in create_certificate
    cert = crypto.X509Req()
           ^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <module 'OpenSSL.crypto' from '/usr/lib/python3/dist-packages/OpenSSL/crypto.py'>
name = 'X509Req'

    def __getattr__(self, name: str) -> typing.Any:
/usr/lib/python3/dist-packages/cryptography/utils.py:76: AttributeError
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_81_certificates.py:196:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
saml2/cert.py:141: in create_certificate
    cert = crypto.X509Req()
           ^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <module 'OpenSSL.crypto' from '/usr/lib/python3/dist-packages/OpenSSL/crypto.py'>
name = 'X509Req'

    def __getattr__(self, name: str) -> typing.Any:
/usr/lib/python3/dist-packages/cryptography/utils.py:76: AttributeError
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_81_certificates.py:159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
saml2/cert.py:141: in create_certificate
    cert = crypto.X509Req()
           ^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <module 'OpenSSL.crypto' from '/usr/lib/python3/dist-packages/OpenSSL/crypto.py'>
name = 'X509Req'

    def __getattr__(self, name: str) -> typing.Any:
/usr/lib/python3/dist-packages/cryptography/utils.py:76: AttributeError
=========================== short test summary info ============================
SKIPPED [1] tests/test_37_entity_categories.py:296: Temporarily disabled
SKIPPED [1] tests/test_37_entity_categories.py:325: Temporarily disabled
SKIPPED [1] tests/test_37_entity_categories.py:358: Temporarily disabled
FAILED tests/test_50_server.py::TestServer1::test_encrypted_signed_response_1 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1::test_encrypted_signed_response_2 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1::test_encrypted_signed_response_3 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1::test_encrypted_signed_response_4 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1::test_encrypted_response_1 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1::test_encrypted_response_2 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1::test_encrypted_response_3 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1NonAsciiAva::test_encrypted_signed_response_1 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1NonAsciiAva::test_encrypted_signed_response_2 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1NonAsciiAva::test_encrypted_signed_response_3 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1NonAsciiAva::test_encrypted_signed_response_4 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1NonAsciiAva::test_encrypted_response_1 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1NonAsciiAva::test_encrypted_response_2 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_50_server.py::TestServer1NonAsciiAva::test_encrypted_response_3 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClient::test_response_2 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClient::test_response_5 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClient::test_response_6 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClient::test_response_8 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClientNonAsciiAva::test_response_2 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClientNonAsciiAva::test_response_5 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClientNonAsciiAva::test_response_6 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_51_client.py::TestClientNonAsciiAva::test_response_8 - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_81_certificates.py::TestGenerateCertificates::test_validate_expire - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
FAILED tests/test_81_certificates.py::TestGenerateCertificates::test_validate_passphrase - AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'
===== 24 failed, 748 passed, 3 skipped, 7 deselected in 144.58s (0:02:24) ======
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_pysaml2/build; python3.14 -m pytest tests -v -Wignore -k "not test_signed_metadata_proper_str_bytes_handling and not test_enc1 and not test_encrypted_response_6 and not test_validate_cert_chains and not test_validate_with_root_cert and not test_namespace_processing"
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.14" --parallel=2 returned exit code 13
make: *** [debian/rules:16: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1143371#8
Date:
2026-08-03 13:55:18 UTC
From:
To:
Hello,

Bug #1143371 in python-pysaml2 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/openstack-team/python/python-pysaml2/-/commit/e82fb9e61b830f39839b08853f0bfbb3605818be
------------------------------------------------------------------------
* Add compat-with-openssl.patch and more-compat-with-recent-openssl.patch
    (Closes: #1143371).
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1143371

#1143371#15
Date:
2026-08-03 14:29:51 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-pysaml2, 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 1143371@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Thomas Goirand <zigo@debian.org> (supplier of updated python-pysaml2 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, 03 Aug 2026 13:20:16 +0200
Source: python-pysaml2
Architecture: source
Version: 7.5.4-3
Distribution: unstable
Urgency: medium
Maintainer: Debian OpenStack <team+openstack@tracker.debian.org>
Changed-By: Thomas Goirand <zigo@debian.org>
Closes: 1143371
Changes:
 python-pysaml2 (7.5.4-3) unstable; urgency=medium
 .
   * Add compat-with-openssl.patch and more-compat-with-recent-openssl.patch
     (Closes: #1143371).
Checksums-Sha1:
 cfa866e7dd8284b921377a1dd752f6c5aae17872 2618 python-pysaml2_7.5.4-3.dsc
 1d2e35379a21e872d7ec9b136daa149c3a2246ec 10824 python-pysaml2_7.5.4-3.debian.tar.xz
 89ebfc3ec3da544b2d6adf562c2fd345c28ead5a 9396 python-pysaml2_7.5.4-3_amd64.buildinfo
Checksums-Sha256:
 bbdca3492f0fe011f56310944269557cff835a20d016b9fb8ad6ee09223455f2 2618 python-pysaml2_7.5.4-3.dsc
 b9e140962f92180dd6377f6aaaadb72fcfef6b42cea8ceaa1d3036af5510899d 10824 python-pysaml2_7.5.4-3.debian.tar.xz
 9bf478e0b9a11e7c7bf4eb893135a9850a19e2929eafed2b104377124afaae54 9396 python-pysaml2_7.5.4-3_amd64.buildinfo
Files:
 16b6bf90457f1af1d661e468e59cf2c8 2618 python optional python-pysaml2_7.5.4-3.dsc
 fbab2a2276d532b1712cda766f0fc83a 10824 python optional python-pysaml2_7.5.4-3.debian.tar.xz
 e046afba7572744f9b88076790c9a383 9396 python optional python-pysaml2_7.5.4-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoLGp81CJVhMOekJc1BatFaxrQ/4FAmpwncoACgkQ1BatFaxr
Q/5ehA//cp2vjNTz/5u+AW8V8QilSNNZ9IwHNUG4LDY8Tk+Y4muFZTCcRDk3kHXP
uHYGpLpP6kcG7YJeOYVfb5/+nt9BCLrh33Bnm6ZrEhldSc4A9TSYFdy4UsNqY0p3
Z7syIjI6BBUKXec+4r6fdTjxnE5vjluf/kl+eR+2BdzXOb/6bx9Sc1v1BsXAYC49
NMEcFz+d1lpke7Xq9Dk/bCM0bBiUAmzw4OzpiCdq9U3THYicpw/PUghUf9nDST0H
edkZXJNVYhOyWEAKszPuiIpWVr0U0+QUW+QBeGW51jCCCQNmZOZ27NR2KyXH6NoA
XqwMedAnPNfmZeWbDz6WgRngeQT4u3NUtbHpRCBBOiwA0NtbuBOkmSvoodKsM6JY
d+f6nqFvtWP8LpaD24rNaD80k8LvjHvSc5UxyV8WYRFcx8p436zJCLyYusrHPmlZ
8Hk1/QXNMUjYuztIpbSgkHlSOvc4geT0KKZBGQCjuP+8lQ3MyKczCEYfGO8JSgBF
a0rQ8wmxhoN3drqxgQPqVbj8YfpdyLEij+RPZXXmvXl2l3utcWPxNj7asnggohM/
ZfXjXBwTRDkxQRUsMbPuVUswp6jJX+ev2NBXfEDF+QpYR2sCrf/+8VrNSCJSQ6+0
GyuxzoOt+q450BIab561QZvAjodSSvKc7TJsYex3LPgjB/DwO7Y=
=a8nO
-----END PGP SIGNATURE-----