Bump OpenSSL to 24.1.* (#11816)

Mark a few classes and functions as deprecated

Closes: #11812
This commit is contained in:
Sebastian Rittau
2024-04-24 16:58:52 +02:00
committed by GitHub
parent f40076c0da
commit 8664482849
2 changed files with 11 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
version = "24.0.*"
version = "24.1.*"
upstream_repository = "https://github.com/pyca/pyopenssl"
# Requires a version of cryptography with a `py.typed` file
requires = ["cryptography>=35.0.0", "types-cffi"]

View File

@@ -2,7 +2,7 @@ from _typeshed import Incomplete, StrOrBytesPath
from collections.abc import Callable, Iterable, Sequence
from datetime import datetime
from typing import Any
from typing_extensions import TypeAlias
from typing_extensions import TypeAlias, deprecated
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey
@@ -98,7 +98,7 @@ class X509Req:
def to_cryptography(self) -> CertificateSigningRequest: ...
def verify(self, pkey: PKey) -> bool: ...
# deprecated
@deprecated("X509Extension support in pyOpenSSL is deprecated. You should use the APIs in cryptography.")
class X509Extension:
def __init__(
self, type_name: bytes, critical: bool, value: bytes, subject: X509 | None = None, issuer: X509 | None = None
@@ -107,7 +107,7 @@ class X509Extension:
def get_data(self) -> bytes: ...
def get_short_name(self) -> bytes: ...
# deprecated
@deprecated("CRL support in pyOpenSSL is deprecated. You should use the APIs in cryptography.")
class Revoked:
def __init__(self) -> None: ...
def all_reasons(self) -> list[bytes]: ...
@@ -118,7 +118,7 @@ class Revoked:
def set_rev_date(self, when: bytes) -> None: ...
def set_serial(self, hex_str: bytes) -> None: ...
# deprecated
@deprecated("CRL support in pyOpenSSL is deprecated. You should use the APIs in cryptography.")
class CRL:
def __init__(self) -> None: ...
def add_revoked(self, revoked: Revoked) -> None: ...
@@ -166,28 +166,6 @@ class X509StoreFlags:
CB_ISSUER_CHECK: int
PARTIAL_CHAIN: int
# deprecated
class PKCS12:
def __init__(self) -> None: ...
def export(self, passphrase: bytes | None = None, iter: int = 2048, maciter: int = 1) -> bytes: ...
def get_ca_certificates(self) -> tuple[X509, ...]: ...
def get_certificate(self) -> X509: ...
def get_friendlyname(self) -> bytes | None: ...
def get_privatekey(self) -> PKey: ...
def set_ca_certificates(self, cacerts: Iterable[X509] | None) -> None: ...
def set_certificate(self, cert: X509) -> None: ...
def set_friendlyname(self, name: bytes | None) -> None: ...
def set_privatekey(self, pkey: PKey) -> None: ...
# deprecated
class NetscapeSPKI:
def __init__(self) -> None: ...
def b64_encode(self) -> bytes: ...
def get_pubkey(self) -> PKey: ...
def set_pubkey(self, pkey: PKey) -> None: ...
def sign(self, pkey: PKey, digest: str) -> None: ...
def verify(self, key: PKey) -> bool: ...
def get_elliptic_curves() -> set[_EllipticCurve]: ...
def get_elliptic_curve(name: str) -> _EllipticCurve: ...
def dump_certificate(type: int, cert: X509) -> bytes: ...
@@ -200,7 +178,11 @@ def dump_privatekey(
def load_privatekey(type: int, buffer: str | bytes, passphrase: bytes | Callable[[], bytes] | None = None) -> PKey: ...
def dump_publickey(type: int, pkey: PKey) -> bytes: ...
def load_publickey(type: int, buffer: str | bytes) -> PKey: ...
def dump_crl(type: int, crl: CRL) -> bytes: ... # deprecated
def load_crl(type: int, buffer: str | bytes) -> CRL: ... # deprecated
@deprecated("sign() is deprecated. Use the equivalent APIs in cryptography.")
def sign(pkey: PKey, data: str | bytes, digest: str) -> bytes: ... # deprecated
@deprecated("verify() is deprecated. Use the equivalent APIs in cryptography.")
def verify(cert: X509, signature: bytes, data: str | bytes, digest: str) -> None: ... # deprecated
@deprecated("CRL support in pyOpenSSL is deprecated. You should use the APIs in cryptography.")
def dump_crl(type: int, crl: CRL) -> bytes: ...
@deprecated("CRL support in pyOpenSSL is deprecated. You should use the APIs in cryptography.")
def load_crl(type: int, buffer: str | bytes) -> CRL: ...