# coding: utf-8 # AUTO-GENERATED FILE -- DO NOT EDIT """ Implementation module for SSL socket operations. See the socket module for documentation. """ ALERT_DESCRIPTION_ACCESS_DENIED = 49 ALERT_DESCRIPTION_BAD_CERTIFICATE = 42 ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = 114 ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = 113 ALERT_DESCRIPTION_BAD_RECORD_MAC = 20 ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = 45 ALERT_DESCRIPTION_CERTIFICATE_REVOKED = 44 ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = 46 ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = 111 ALERT_DESCRIPTION_CLOSE_NOTIFY = 0 ALERT_DESCRIPTION_DECODE_ERROR = 50 ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = 30 ALERT_DESCRIPTION_DECRYPT_ERROR = 51 ALERT_DESCRIPTION_HANDSHAKE_FAILURE = 40 ALERT_DESCRIPTION_ILLEGAL_PARAMETER = 47 ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = 71 ALERT_DESCRIPTION_INTERNAL_ERROR = 80 ALERT_DESCRIPTION_NO_RENEGOTIATION = 100 ALERT_DESCRIPTION_PROTOCOL_VERSION = 70 ALERT_DESCRIPTION_RECORD_OVERFLOW = 22 ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = 10 ALERT_DESCRIPTION_UNKNOWN_CA = 48 ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = 115 ALERT_DESCRIPTION_UNRECOGNIZED_NAME = 112 ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = 43 ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = 110 ALERT_DESCRIPTION_USER_CANCELLED = 90 CERT_NONE = 0 CERT_OPTIONAL = 1 CERT_REQUIRED = 2 HAS_ALPN = True HAS_ECDH = True HAS_NPN = True HAS_SNI = True HAS_SSLv2 = False HAS_SSLv3 = False HAS_TLS_UNIQUE = True HAS_TLSv1 = True HAS_TLSv1_1 = True HAS_TLSv1_2 = True HAS_TLSv1_3 = False HOSTFLAG_ALWAYS_CHECK_SUBJECT = 1 HOSTFLAG_MULTI_LABEL_WILDCARDS = 8 HOSTFLAG_NEVER_CHECK_SUBJECT = 32 HOSTFLAG_NO_PARTIAL_WILDCARDS = 4 HOSTFLAG_NO_WILDCARDS = 2 HOSTFLAG_SINGLE_LABEL_SUBDOMAINS = 16 class MemoryBIO(object): eof = property(None, None, None, """ Whether the memory BIO is at EOF. """ ) pending = property(None, None, None, """ The number of bytes pending in the memory BIO. """ ) def read(self, size=-1): """ Read up to size bytes from the memory BIO. If size is not specified, read the entire buffer. If the return value is an empty bytes instance, this means either EOF or that no data is available. Use the "eof" property to distinguish between the two. """ pass def write(self, b): """ Writes the bytes b into the memory BIO. Returns the number of bytes written. """ pass def write_eof(self): """ Write an EOF marker to the memory BIO. When all data has been read, the "eof" property will be True. """ pass OPENSSL_VERSION = 'OpenSSL 1.1.0j 20 Nov 2018' OPENSSL_VERSION_INFO = () OPENSSL_VERSION_NUMBER = 269484207 OP_ALL = -2147483564 OP_CIPHER_SERVER_PREFERENCE = 4194304 OP_NO_COMPRESSION = 131072 OP_NO_RENEGOTIATION = 1073741824 OP_NO_SSLv2 = 0 OP_NO_SSLv3 = 33554432 OP_NO_TICKET = 16384 OP_NO_TLSv1 = 67108864 OP_NO_TLSv1_1 = 268435456 OP_NO_TLSv1_2 = 134217728 OP_NO_TLSv1_3 = 0 OP_SINGLE_DH_USE = 0 OP_SINGLE_ECDH_USE = 0 PROTOCOL_SSLv23 = 2 PROTOCOL_TLS = 2 PROTOCOL_TLS_CLIENT = 16 PROTOCOL_TLS_SERVER = 17 PROTOCOL_TLSv1 = 3 PROTOCOL_TLSv1_1 = 4 PROTOCOL_TLSv1_2 = 5 PROTO_MAXIMUM_SUPPORTED = -1 PROTO_MINIMUM_SUPPORTED = -2 PROTO_SSLv3 = 768 PROTO_TLSv1 = 769 PROTO_TLSv1_1 = 770 PROTO_TLSv1_2 = 771 PROTO_TLSv1_3 = 772 def RAND_add(string, entropy): """ Mix string into the OpenSSL PRNG state. entropy (a float) is a lower bound on the entropy contained in string. See RFC 4086. """ pass def RAND_bytes(n): """ Generate n cryptographically strong pseudo-random bytes. """ pass def RAND_pseudo_bytes(n): """ Generate n pseudo-random bytes. Return a pair (bytes, is_cryptographic). is_cryptographic is True if the bytes generated are cryptographically strong. """ pass def RAND_status(): """ Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not. It is necessary to seed the PRNG with RAND_add() on some platforms before using the ssl() function. """ pass class SSLCertVerificationError(SSLError): """ A certificate could not be verified. """ pass class SSLEOFError(SSLError): """ SSL/TLS connection terminated abruptly. """ pass class SSLError(OSError): """ An error occurred in the SSL implementation. """ pass class SSLSession(object): has_ticket = property(None, None, None, """ Does the session contain a ticket? """ ) id = property(None, None, None, """ Session id """ ) ticket_lifetime_hint = property(None, None, None, """ Ticket life time hint. """ ) time = property(None, None, None, """ Session creation time (seconds since epoch). """ ) timeout = property(None, None, None, """ Session timeout (delta in seconds). """ ) pass class SSLSyscallError(SSLError): """ System error when attempting SSL operation. """ pass class SSLWantReadError(SSLError): """ Non-blocking SSL socket needs to read more data before the requested operation can be completed. """ pass class SSLWantWriteError(SSLError): """ Non-blocking SSL socket needs to write more data before the requested operation can be completed. """ pass class SSLZeroReturnError(SSLError): """ SSL/TLS session closed cleanly. """ pass SSL_ERROR_EOF = 8 SSL_ERROR_INVALID_ERROR_CODE = 10 SSL_ERROR_SSL = 1 SSL_ERROR_SYSCALL = 5 SSL_ERROR_WANT_CONNECT = 7 SSL_ERROR_WANT_READ = 2 SSL_ERROR_WANT_WRITE = 3 SSL_ERROR_WANT_X509_LOOKUP = 4 SSL_ERROR_ZERO_RETURN = 6 VERIFY_CRL_CHECK_CHAIN = 12 VERIFY_CRL_CHECK_LEAF = 4 VERIFY_DEFAULT = 0 VERIFY_X509_STRICT = 32 VERIFY_X509_TRUSTED_FIRST = 32768 _DEFAULT_CIPHERS = 'DEFAULT:!aNULL:!eNULL:!MD5:!3DES:!DES:!RC4:!IDEA:!SEED:!aDSS:!SRP:!PSK' _OPENSSL_API_VERSION = () class _SSLContext(object): _host_flags = property(None, None, None, ) def _set_alpn_protocols(self, protos): pass def _set_npn_protocols(self, protos): pass def _wrap_bio(self, incoming, outgoing, server_side, server_hostname=None, owner=None, session=None): pass def _wrap_socket(self, sock, server_side, server_hostname=None, owner=None, session=None): pass def cert_store_stats(self): """ Returns quantities of loaded X.509 certificates. X.509 certificates with a CA extension and certificate revocation lists inside the context's cert store. NOTE: Certificates in a capath directory aren't loaded unless they have been used at least once. """ pass check_hostname = property(None, None, None, ) def get_ca_certs(self, binary_form=False): """ Returns a list of dicts with information of loaded CA certs. If the optional argument is True, returns a DER-encoded copy of the CA certificate. NOTE: Certificates in a capath directory aren't loaded unless they have been used at least once. """ pass def get_ciphers(self): pass def load_cert_chain(self, certfile, keyfile=None, password=None): pass def load_dh_params(self, path): pass def load_verify_locations(self, cafile=None, capath=None, cadata=None): pass maximum_version = property(None, None, None, ) minimum_version = property(None, None, None, ) options = property(None, None, None, ) post_handshake_auth = property(None, None, None, ) protocol = property(None, None, None, ) def session_stats(self): pass def set_ciphers(self, cipherlist): pass def set_default_verify_paths(self): pass def set_ecdh_curve(self, name): pass sni_callback = property(None, None, None, """ Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension. If the argument is None then the callback is disabled. The method is called with the SSLSocket, the server name as a string, and the SSLContext object. See RFC 6066 for details of the SNI extension. """ ) verify_flags = property(None, None, None, ) verify_mode = property(None, None, None, ) class _SSLSocket(object): def cipher(self): pass def compression(self): pass context = property(None, None, None, """ _setter_context(ctx) This changes the context associated with the SSLSocket. This is typically used from within a callback function set by the sni_callback on the SSLContext to change the certificate information associated with the SSLSocket before the cryptographic exchange handshake messages """ ) def do_handshake(self): pass def get_channel_binding(self, cb_type='tls-unique'): """ Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake). Only 'tls-unique' channel binding data from RFC 5929 is supported. """ pass def getpeercert(self, der=False): """ Returns the certificate for the peer. If no certificate was provided, returns None. If a certificate was provided, but not validated, returns an empty dictionary. Otherwise returns a dict containing information about the peer certificate. If the optional argument is True, returns a DER-encoded copy of the peer certificate, or None if no certificate was provided. This will return the certificate even if it wasn't validated. """ pass owner = property(None, None, None, """ The Python-level owner of this object.Passed as "self" in servername callback. """ ) def pending(self): """ Returns the number of already decrypted bytes available for read, pending on the connection. """ pass def read(self, size, buffer=None): """ read(size, [buffer]) Read up to size bytes from the SSL socket. """ pass def selected_alpn_protocol(self): pass def selected_npn_protocol(self): pass server_hostname = property(None, None, None, """ The currently set server hostname (for SNI). """ ) server_side = property(None, None, None, """ Whether this is a server-side socket. """ ) session = property(None, None, None, """ _setter_session(session) Get / set SSLSession. """ ) session_reused = property(None, None, None, """ Was the client session reused during handshake? """ ) def shared_ciphers(self): pass def shutdown(self): """ Does the SSL shutdown handshake with the remote end. """ pass def verify_client_post_handshake(self): """ Initiate TLS 1.3 post-handshake authentication """ pass def version(self): pass def write(self, b): """ Writes the bytes-like object b into the SSL object. Returns the number of bytes written. """ pass __doc__ = """Implementation module for SSL socket operations. See the socket module for documentation.""" __file__ = 'C:\\src\\ide\\build-files\\build-temp\\runtimes-release\\__os__\\win32\\runtime-python3.7\\DLLs\\_ssl.pyd' __loader__ = None __name__ = '_ssl' __package__ = '' __spec__ = None def _test_decode_cert(path): pass def enum_certificates(store_name): """ Retrieve certificates from Windows' cert store. store_name may be one of 'CA', 'ROOT' or 'MY'. The system may provide more cert storages, too. The function returns a list of (bytes, encoding_type, trust) tuples. The encoding_type flag can be interpreted with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The trust setting is either a set of OIDs or the boolean True. """ pass def enum_crls(store_name): """ Retrieve CRLs from Windows' cert store. store_name may be one of 'CA', 'ROOT' or 'MY'. The system may provide more cert storages, too. The function returns a list of (bytes, encoding_type) tuples. The encoding_type flag can be interpreted with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. """ pass err_codes_to_names = {} err_names_to_codes = {} def get_default_verify_paths(): """ Return search paths and environment vars that are used by SSLContext's set_default_verify_paths() to load default CAs. The values are 'cert_file_env', 'cert_file', 'cert_dir_env', 'cert_dir'. """ pass lib_codes_to_names = {} def nid2obj(nid): """ Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID. """ pass def txt2obj(txt, name=False): """ Lookup NID, short name, long name and OID of an ASN1_OBJECT. By default objects are looked up by OID. With name=True short and long name are also matched. """ pass