mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 05:41:11 +08:00
cadata param can (and PEM-encoded cadata must) be unicode under PY2 (#3150)
This commit is contained in:
committed by
Sebastian Rittau
parent
72010bc5dc
commit
75ccbdcab5
@@ -1,7 +1,8 @@
|
||||
# Stubs for ssl
|
||||
|
||||
from typing import (
|
||||
Any, Callable, ClassVar, Dict, List, NamedTuple, Optional, Set, Tuple, Union,
|
||||
Any, Callable, ClassVar, Dict, List, NamedTuple, Optional, Set, Text, Tuple,
|
||||
Union,
|
||||
)
|
||||
import enum
|
||||
import socket
|
||||
@@ -53,20 +54,19 @@ def create_default_context(
|
||||
*,
|
||||
cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ...,
|
||||
cadata: Union[str, bytes, None] = ...,
|
||||
cadata: Union[Text, bytes, None] = ...,
|
||||
) -> SSLContext: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
def _create_unverified_context(protocol: int = ..., *,
|
||||
cert_reqs: int = ...,
|
||||
check_hostname: bool = ...,
|
||||
purpose: Any = ...,
|
||||
certfile: Optional[str] = ...,
|
||||
keyfile: Optional[str] = ...,
|
||||
cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ...,
|
||||
cadata: Union[str, bytes, None] = ...) -> SSLContext: ...
|
||||
_create_default_https_context: Callable[..., SSLContext]
|
||||
def _create_unverified_context(protocol: int = ..., *,
|
||||
cert_reqs: int = ...,
|
||||
check_hostname: bool = ...,
|
||||
purpose: Any = ...,
|
||||
certfile: Optional[str] = ...,
|
||||
keyfile: Optional[str] = ...,
|
||||
cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ...,
|
||||
cadata: Union[Text, bytes, None] = ...) -> SSLContext: ...
|
||||
_create_default_https_context: Callable[..., SSLContext]
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
def RAND_bytes(num: int) -> bytes: ...
|
||||
@@ -234,7 +234,7 @@ class SSLContext:
|
||||
self,
|
||||
cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ...,
|
||||
cadata: Union[str, bytes, None] = ...,
|
||||
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: ...
|
||||
|
||||
Reference in New Issue
Block a user