Skip to content

Commit

Permalink
Add get_verified_chain and get_unverified_chain for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
layday committed Apr 5, 2024
1 parent 7119589 commit 4c9e096
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion stdlib/ssl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import enum
import socket
import sys
from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer
from collections.abc import Callable, Iterable
from collections.abc import Callable, Iterable, Sequence
from typing import Any, Literal, NamedTuple, TypedDict, final, overload
from typing_extensions import Never, Self, TypeAlias

Expand Down Expand Up @@ -366,6 +366,9 @@ class SSLSocket(socket.socket):
def recvmsg(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override]
def recvmsg_into(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override]
def sendmsg(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override]
if sys.version_info >= (3, 13):
def get_verified_chain(self) -> Sequence[bytes]: ...
def get_unverified_chain(self) -> Sequence[bytes]: ...

class TLSVersion(enum.IntEnum):
MINIMUM_SUPPORTED: int
Expand Down Expand Up @@ -476,6 +479,9 @@ class SSLObject:
def version(self) -> str | None: ...
def get_channel_binding(self, cb_type: str = "tls-unique") -> bytes | None: ...
def verify_client_post_handshake(self) -> None: ...
if sys.version_info >= (3, 13):
def get_verified_chain(self) -> Sequence[bytes]: ...
def get_unverified_chain(self) -> Sequence[bytes]: ...

@final
class MemoryBIO:
Expand Down

0 comments on commit 4c9e096

Please sign in to comment.