mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Fixes for ssl (#4164)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Stubs for ssl
|
||||
|
||||
from typing import (
|
||||
Any, Callable, ClassVar, Dict, List, NamedTuple, Optional, Set, Text, Type, Tuple, Union,
|
||||
Any, Callable, ClassVar, Dict, Iterable, List, NamedTuple, Optional, Set, Text, Type, Tuple, Union,
|
||||
overload
|
||||
)
|
||||
import enum
|
||||
@@ -283,18 +283,18 @@ class SSLContext:
|
||||
def load_default_certs(self, purpose: Purpose = ...) -> None: ...
|
||||
def load_verify_locations(
|
||||
self,
|
||||
cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ...,
|
||||
cafile: Optional[_Path] = ...,
|
||||
capath: Optional[_Path] = ...,
|
||||
cadata: Union[Text, bytes, None] = ...,
|
||||
) -> None: ...
|
||||
def get_ca_certs(self, binary_form: bool = ...) -> Union[List[_PeerCertRetDictType], List[bytes]]: ...
|
||||
def set_default_verify_paths(self) -> None: ...
|
||||
def set_ciphers(self, __cipherlist: str) -> None: ...
|
||||
def set_alpn_protocols(self, alpn_protocols: List[str]) -> None: ...
|
||||
def set_alpn_protocols(self, alpn_protocols: Iterable[str]) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
sni_callback: Optional[Callable[[SSLObject, str, SSLContext], Union[None, int]]]
|
||||
sslobject_class: Type[SSLObject]
|
||||
def set_npn_protocols(self, npn_protocols: List[str]) -> None: ...
|
||||
def set_npn_protocols(self, npn_protocols: Iterable[str]) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def set_servername_callback(self, server_name_callback: Optional[_SrvnmeCbType]) -> None: ...
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user