# 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_TLS_UNIQUE = True OPENSSL_VERSION = 'OpenSSL 1.1.0h 27 Mar 2018' OPENSSL_VERSION_INFO = () OPENSSL_VERSION_NUMBER = None OP_ALL = 2147483732 OP_CIPHER_SERVER_PREFERENCE = 4194304 OP_NO_COMPRESSION = 131072 OP_NO_SSLv2 = 0 OP_NO_SSLv3 = 33554432 OP_NO_TLSv1 = 67108864 OP_NO_TLSv1_1 = 268435456 OP_NO_TLSv1_2 = 134217728 OP_SINGLE_DH_USE = 0 OP_SINGLE_ECDH_USE = 0 PROTOCOL_SSLv23 = 2 PROTOCOL_TLS = 2 PROTOCOL_TLSv1 = 3 PROTOCOL_TLSv1_1 = 4 PROTOCOL_TLSv1_2 = 5 def RAND_add(string, entropy): """ 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 1750. """ pass def RAND_status(): """ RAND_status() -> 0 or 1 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. """ return None class SSLEOFError(SSLError): """ SSL/TLS connection terminated abruptly. """ pass class SSLError(error): """ An error occurred in the SSL implementation. """ 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 _OPENSSL_API_VERSION = () class _SSLContext(object): def _set_alpn_protocols(self): pass def _set_npn_protocols(self): pass def _wrap_socket(self): pass def cert_store_stats(self): """ cert_store_stats() -> {'crl': int, 'x509_ca': int, 'x509': int} 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. """ return {1, 1, 1} check_hostname = property(None, None, None, ) def get_ca_certs(self, binary_form=False): """ get_ca_certs(binary_form=False) -> list of loaded certificate 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. """ return [] def load_cert_chain(self): pass def load_dh_params(self): pass def load_verify_locations(self): pass options = property(None, None, None, ) def session_stats(self): pass def set_ciphers(self): pass def set_default_verify_paths(self): pass def set_ecdh_curve(self): pass def set_servername_callback(self, method): """ set_servername_callback(method) This sets 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. """ pass 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 set_servername_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 peer_certificate(self, der=False): """ peer_certificate([der=False]) -> certificate 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. """ return None def pending(self): """ pending() -> count Returns the number of already decrypted bytes available for read, pending on the connection. """ return None def read(self, len=None): """ read([len]) -> string Read up to len bytes from the SSL socket. """ return "" def selected_alpn_protocol(self): pass def selected_npn_protocol(self): pass def shutdown(self, s): """ shutdown(s) -> socket Does the SSL shutdown handshake with the remote end, and returns the underlying socket object. """ return SocketType() def tls_unique_cb(self): """ tls_unique_cb() -> bytes Returns the 'tls-unique' channel binding data, as defined by RFC 5929. If the TLS handshake is not yet complete, None is returned """ return None def version(self): pass def write(self, s): """ write(s) -> len Writes the string s into the SSL object. Returns the number of bytes written. """ return None __doc__ = """Implementation module for SSL socket operations. See the socket module for documentation.""" __file__ = '/Users/Shared/src/ide/build-files/build-temp/runtimes-release/__os__/osx/runtime-python2.7/lib/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so' __name__ = '_ssl' __package__ = None def _test_decode_cert(): pass err_codes_to_names = {} err_names_to_codes = {} def get_default_verify_paths(): """ get_default_verify_paths() -> tuple 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'. """ return () lib_codes_to_names = {} def nid2obj(nid): """ nid2obj(nid) -> (nid, shortname, longname, oid) Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID. """ return (None, None, None, None) def txt2obj(txt, name=False): """ txt2obj(txt, name=False) -> (nid, shortname, longname, oid) 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. """ return (None, None, None, None)