import ssl
from _typeshed import Incomplete
from enum import StrEnum
from functools import cache

type SSLALPNProtocols = tuple[str, ...] | None
SSL_ALPN_NONE: SSLALPNProtocols
SSL_ALPN_HTTP11: SSLALPNProtocols
SSL_ALPN_HTTP11_HTTP2: SSLALPNProtocols

class SSLCipherList(StrEnum):
    PYTHON_DEFAULT = 'python_default'
    INTERMEDIATE = 'intermediate'
    MODERN = 'modern'
    INSECURE = 'insecure'

SSL_CIPHER_LISTS: Incomplete

@cache
def _client_context_no_verify(ssl_cipher_list: SSLCipherList, alpn_protocols: SSLALPNProtocols) -> ssl.SSLContext: ...
def _create_client_context(ssl_cipher_list: SSLCipherList = ..., alpn_protocols: SSLALPNProtocols = ...) -> ssl.SSLContext: ...
@cache
def _client_context(ssl_cipher_list: SSLCipherList = ..., alpn_protocols: SSLALPNProtocols = ...) -> ssl.SSLContext: ...

_SSL_ALPN_PROTOCOLS: Incomplete

def get_default_context() -> ssl.SSLContext: ...
def get_default_no_verify_context() -> ssl.SSLContext: ...
def client_context_no_verify(ssl_cipher_list: SSLCipherList = ..., alpn_protocols: SSLALPNProtocols = ...) -> ssl.SSLContext: ...
def client_context(ssl_cipher_list: SSLCipherList = ..., alpn_protocols: SSLALPNProtocols = ...) -> ssl.SSLContext: ...
def create_client_context(ssl_cipher_list: SSLCipherList = ..., alpn_protocols: SSLALPNProtocols = ...) -> ssl.SSLContext: ...
def create_no_verify_ssl_context(ssl_cipher_list: SSLCipherList = ..., alpn_protocols: SSLALPNProtocols = ...) -> ssl.SSLContext: ...
def server_context_modern() -> ssl.SSLContext: ...
def server_context_intermediate() -> ssl.SSLContext: ...
