public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-asyncssh] rawhide: Fix build with OpenSSL4+
@ 2026-11-30 17:37 Filipe Rosset
0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-11-30 17:37 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-asyncssh
Branch : rawhide
Commit : b609b5067c3c565a9b1946cc73b4a5ee83b5028d
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-11-30T12:08:48-03:00
Stats : +41/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-asyncssh/c/b609b5067c3c565a9b1946cc73b4a5ee83b5028d?branch=rawhide
Log:
Fix build with OpenSSL4+
Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
---
diff --git a/openssl4-sha1.diff b/openssl4-sha1.diff
new file mode 100644
index 0000000..ffb917a
--- /dev/null
+++ b/openssl4-sha1.diff
@@ -0,0 +1,37 @@
+--- a/tests/test_sshsig.py 2026-11-27 19:19:30.486042700 -0300
++++ b/tests/test_sshsig.py 2026-11-30 11:59:10.068640629 -0300
+@@ -30,6 +30,24 @@
+ from .util import TempDirTestCase, get_test_key
+
+
++def _sha1_rsa_signing_supported() -> bool:
++ """Check if the crypto backend supports SHA1 for RSA signing"""
++
++ try:
++ from cryptography.hazmat.primitives import hashes
++ from cryptography.hazmat.primitives.asymmetric import padding
++ from cryptography.hazmat.primitives.asymmetric import rsa
++
++ key = rsa.generate_private_key(65537, 2048)
++ key.sign(b'x', padding.PKCS1v15(), hashes.SHA1())
++ return True
++ except Exception:
++ return False
++
++
++_SHA1_RSA_SIGNING = _sha1_rsa_signing_supported()
++
++
+ class _TestSSHSIG(TempDirTestCase):
+ """Unit tests for sshsig module"""
+
+@@ -272,6 +290,9 @@
+ (('principal', None, self._rsa_keypair),))
+
+ for sig_alg in sorted(self._rsa_keypair.all_sig_algorithms):
++ if not _SHA1_RSA_SIGNING and \
++ sig_alg in (b'ssh-rsa', b'rsa1024-sha1'):
++ continue
+ with self.subTest(sig_alg=sig_alg):
+ sig = (b'SSHSIG' + UInt32(1) +
+ String(self._rsa_keypair.public_data) +
diff --git a/python-asyncssh.spec b/python-asyncssh.spec
index a73019f..195b8fc 100644
--- a/python-asyncssh.spec
+++ b/python-asyncssh.spec
@@ -13,6 +13,10 @@ Summary: Asynchronous SSH for Python
License: EPL-2.0 OR GPL-2.0-or-later
URL: https://github.com/ronf/asyncssh
Source0: %pypi_source
+# OpenSSL 4.0 (and 3.x without the legacy provider) no longer supports
+# SHA1 for RSA signing, so skip the ssh-rsa / rsa1024-sha1 signature
+# algorithms in the test when the backend cannot do them.
+Patch0: openssl4-sha1.diff
BuildArch: noarch
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-30 17:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 17:37 [rpms/python-asyncssh] rawhide: Fix build with OpenSSL4+ Filipe Rosset
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox