python-pyopenssl: bump to 26.2.0

Refresh sha256 from PyPI sdist. pyOpenSSL 26.2.0 dropped EC support
from the legacy crypto.PKey API (the call surfaces as "OpenSSL.crypto.Error:
No such key type"); drop the EC-key arm of test.sh accordingly. Upstream
points at the cryptography package for EC key generation.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean authored and Alexandru Ardelean committed 2026-06-05 07:37:42 +03:00
1 parent f0ce6e6cfd
commit e4bf8904fb
2 files changed
+6 -7

No files matched your search

+4 -5
View File
@@ -16,7 +16,7 @@ if version != "$2":
from OpenSSL import SSL, crypto
from OpenSSL.crypto import (
PKey, TYPE_RSA, TYPE_EC,
PKey, TYPE_RSA,
X509, X509Req, X509Store, X509StoreContext,
dump_certificate, dump_privatekey, load_certificate, load_privatekey,
dump_certificate_request,
@@ -24,16 +24,15 @@ from OpenSSL.crypto import (
)
# --- Key generation ---
# pyOpenSSL 26.2.0 dropped EC support from the legacy crypto.PKey API
# ("OpenSSL.crypto.Error: No such key type"). For EC keys, the upstream
# recommendation is to use the cryptography package directly.
rsa_key = PKey()
rsa_key.generate_key(TYPE_RSA, 2048)
assert rsa_key.bits() == 2048
assert rsa_key.type() == TYPE_RSA
ec_key = PKey()
ec_key.generate_key(TYPE_EC, 256)
assert ec_key.type() == TYPE_EC
# --- Self-signed certificate ---
cert = X509()