]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
python-common/cryptotools: stop using the removed X509Req API 69710/head
authorKefu Chai <k.chai@proxmox.com>
Sat, 13 Jun 2026 01:50:09 +0000 (09:50 +0800)
committerKefu Chai <k.chai@proxmox.com>
Thu, 25 Jun 2026 07:16:37 +0000 (15:16 +0800)
commitf95e5f7bc8444c2fdf2ccaa05f717a7a75c64f78
treebcd831b73b6c400cfde146986ba27e5a0b8d80b8
parent4a9d5bdf6fdaa4068c0815361ff471dc42502eea
python-common/cryptotools: stop using the removed X509Req API

pyOpenSSL deprecated OpenSSL.crypto.X509Req in 24.2.0 (2024-07-20) and
removed it in 26.3.0 (2026-06-12). as we don't pin pyopenssl, CI picked
up the new release, and create_self_signed_cert() started failing with:

  AttributeError: module 'OpenSSL.crypto' has no attribute 'X509Req'

this took down run-tox-mgr, run-tox-mgr-dashboard-py3 and the mypy check.

we only used X509Req to build a subject name and then copied it into the
X509 cert. so drop it, and set the subject on the cert directly. the
resulting cert stays the same: subject from dname, issuer set to the same
subject, self-signed.

Fixes: https://tracker.ceph.com/issues/77391
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
(cherry picked from commit 1dda56b1a00a6cbf520d932332ff097716ab256e)
src/python-common/ceph/cryptotools/internal.py