include $(TOPDIR)/rules.mk
PKG_NAME:=python-pyopenssl
-PKG_VERSION:=26.0.0
+PKG_VERSION:=26.2.0
PKG_RELEASE:=1
PYPI_NAME:=pyOpenSSL
PYPI_SOURCE_NAME:=pyopenssl
-PKG_HASH:=f293934e52936f2e3413b89c6ce36df66a0b34ae1ea3a053b8c5020ff2f513fc
+PKG_HASH:=8c6fcecd1183a7fc897548dfe388b0cdb7f37e018200d8409cf33959dbe35387
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
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,
)
# --- 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()