Markdown Format | JSON API | MCP Server Tool
Help on module _ssl: NAME _ssl MODULE REFERENCE https://docs.python.org/3.10/library/_ssl.html The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. DESCRIPTION Implementation module for SSL socket operations. See the socket module for documentation. CLASSES builtins.OSError(builtins.Exception) ssl.SSLError ssl.SSLCertVerificationError(ssl.SSLError, builtins.ValueError) ssl.SSLEOFError ssl.SSLSyscallError ssl.SSLWantReadError ssl.SSLWantWriteError ssl.SSLZeroReturnError builtins.object Certificate MemoryBIO SSLSession class Certificate(builtins.object) | Methods defined here: | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | get_info(self, /) | | public_bytes(...) class MemoryBIO(builtins.object) | Methods defined here: | | 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. | | write(self, b, /) | Writes the bytes b into the memory BIO. | | Returns the number of bytes written. | | write_eof(self, /) | Write an EOF marker to the memory BIO. | | When all data has been read, the "eof" property will be True. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | eof | Whether the memory BIO is at EOF. | | pending | The number of bytes pending in the memory BIO. class SSLCertVerificationError(SSLError, builtins.ValueError) | A certificate could not be verified. | | Method resolution order: | SSLCertVerificationError | SSLError | builtins.OSError | builtins.ValueError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from SSLError: | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class SSLEOFError(SSLError) | SSL/TLS connection terminated abruptly. | | Method resolution order: | SSLEOFError | SSLError | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from SSLError: | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class SSLError(builtins.OSError) | An error occurred in the SSL implementation. | | Method resolution order: | SSLError | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class SSLSession(builtins.object) | Methods defined here: | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | has_ticket | Does the session contain a ticket? | | id | Session id | | ticket_lifetime_hint | Ticket life time hint. | | time | Session creation time (seconds since epoch). | | timeout | Session timeout (delta in seconds). | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None class SSLSyscallError(SSLError) | System error when attempting SSL operation. | | Method resolution order: | SSLSyscallError | SSLError | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from SSLError: | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class SSLWantReadError(SSLError) | Non-blocking SSL socket needs to read more data | before the requested operation can be completed. | | Method resolution order: | SSLWantReadError | SSLError | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from SSLError: | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class SSLWantWriteError(SSLError) | Non-blocking SSL socket needs to write more data | before the requested operation can be completed. | | Method resolution order: | SSLWantWriteError | SSLError | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from SSLError: | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class SSLZeroReturnError(SSLError) | SSL/TLS session closed cleanly. | | Method resolution order: | SSLZeroReturnError | SSLError | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from SSLError: | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args FUNCTIONS 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. RAND_bytes(n, /) Generate n cryptographically strong pseudo-random bytes. 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. RAND_status() Returns True if the OpenSSL PRNG has been seeded with enough data and False if not. It is necessary to seed the PRNG with RAND_add() on some platforms before using the ssl() function. 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'. nid2obj(nid, /) Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID. 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. DATA 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 ENCODING_DER = 2 ENCODING_PEM = 1 HAS_ALPN = True HAS_ECDH = True HAS_NPN = False 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 = True 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 OPENSSL_VERSION = 'OpenSSL 3.0.2 15 Mar 2022' OPENSSL_VERSION_INFO = (3, 0, 0, 2, 0) OPENSSL_VERSION_NUMBER = 805306400 OP_ALL = 2147483728 OP_CIPHER_SERVER_PREFERENCE = 4194304 OP_ENABLE_MIDDLEBOX_COMPAT = 1048576 OP_IGNORE_UNEXPECTED_EOF = 128 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 = 536870912 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 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_ALLOW_PROXY_CERTS = 64 VERIFY_CRL_CHECK_CHAIN = 12 VERIFY_CRL_CHECK_LEAF = 4 VERIFY_DEFAULT = 0 VERIFY_X509_PARTIAL_CHAIN = 524288 VERIFY_X509_STRICT = 32 VERIFY_X509_TRUSTED_FIRST = 32768 err_codes_to_names = {(3, 100): 'ARG2_LT_ARG3', (3, 101): 'BAD_RECIPRO... err_names_to_codes = {'ACCEPT_ERROR': (32, 100), 'ADDING_OBJECT': (13,... lib_codes_to_names = {1: 'NONE', 2: 'SYS', 3: 'BN', 4: 'RSA', 5: 'DH',... FILE /usr/lib/python3.10/lib-dynload/_ssl.cpython-310-x86_64-linux-gnu.so
Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:13 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)