On this page
ssl.SSLErrorNumber
Prev: ssl.SSLError | Up: ssl | Next: ssl.SSLObject
Rel: ssl.AlertDescription, ssl.cert_time_to_seconds, ssl.CertificateError, ssl.create_connection
Ref: docs.python.org — ssl.SSLErrorNumber
Tags: #public #python3 #stdlib #ssl
Import
import ssl
from ssl import SSLErrorNumber
Signature & Overview
ssl.SSLErrorNumber(*values)
An enumeration.
Methods & Attributes
SSLErrorNumber.as_integer_ratio(self, /)— Return a pair of integers, whose ratio is equal to the original int.SSLErrorNumber.bit_count(self, /)— Number of ones in the binary representation of the absolute value of self.SSLErrorNumber.bit_length(self, /)— Number of bits necessary to represent self in binary.SSLErrorNumber.conjugate(self, /)— Returns self, the complex conjugate of any int.SSLErrorNumber.from_bytes(bytes, byteorder='big', *, signed=False)— Return the integer represented by the given array of bytes.SSLErrorNumber.is_integer(self, /)— Returns True. Exists for duck type compatibility with float.is_integer.SSLErrorNumber.to_bytes(self, /, length=1, byteorder='big', *, signed=False)— Return an array of bytes representing an integer.
Usage
import ssl
assert isinstance(ssl.SSLErrorNumber.SSL_ERROR_EOF, int)
Gotchas
- Low-level OpenSSL error code enum: Prefer catching the specific Python exception subclasses (
SSLWantReadError,SSLEOFError,SSLCertVerificationError).
REPL Inspect
from ssl import SSLErrorNumber
help(SSLErrorNumber)
Linked from
Related notes
- tuts/python3/stdlib_module/ssl/SSLError Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/SSLObject Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ssl/AlertDescription Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/cert_time_to_seconds Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/CertificateError Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/create_connection Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/create_default_context shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/DefaultVerifyPaths shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/DER_cert_to_PEM_cert shared tags: #ssl, #stdlib