On this page
ssl.AlertDescription
Up: ssl | Next: ssl.cert_time_to_seconds
Rel: ssl.cert_time_to_seconds, ssl.CertificateError, ssl.create_connection, ssl.create_default_context
Ref: docs.python.org — ssl.AlertDescription
Tags: #public #python3 #stdlib #ssl
Import
import ssl
from ssl import AlertDescription
Signature & Overview
ssl.AlertDescription(*values)
An enumeration.
Methods & Attributes
AlertDescription.as_integer_ratio(self, /)— Return a pair of integers, whose ratio is equal to the original int.AlertDescription.bit_count(self, /)— Number of ones in the binary representation of the absolute value of self.AlertDescription.bit_length(self, /)— Number of bits necessary to represent self in binary.AlertDescription.conjugate(self, /)— Returns self, the complex conjugate of any int.AlertDescription.from_bytes(bytes, byteorder='big', *, signed=False)— Return the integer represented by the given array of bytes.AlertDescription.is_integer(self, /)— Returns True. Exists for duck type compatibility with float.is_integer.AlertDescription.to_bytes(self, /, length=1, byteorder='big', *, signed=False)— Return an array of bytes representing an integer.
Usage
import ssl
assert ssl.AlertDescription.ALERT_DESCRIPTION_HANDSHAKE_FAILURE == 40
Gotchas
- TLS alert codes (
IntEnum): Returned by SNI callbacks (SSLContext.sni_callback) to abort a handshake with a specific TLS alert.
REPL Inspect
from ssl import AlertDescription
help(AlertDescription)
Linked from
- tuts/python3/stdlib_module/ssl
- tuts/python3/stdlib_module/ssl/cert_time_to_seconds
- tuts/python3/stdlib_module/ssl/CertificateError
- tuts/python3/stdlib_module/ssl/create_connection
- tuts/python3/stdlib_module/ssl/create_default_context
- tuts/python3/stdlib_module/ssl/DefaultVerifyPaths
- tuts/python3/stdlib_module/ssl/DER_cert_to_PEM_cert
- tuts/python3/stdlib_module/ssl/get_default_verify_paths
- tuts/python3/stdlib_module/ssl/get_protocol_name
- tuts/python3/stdlib_module/ssl/get_server_certificate
- tuts/python3/stdlib_module/ssl/MemoryBIO
- tuts/python3/stdlib_module/ssl/namedtuple
- tuts/python3/stdlib_module/ssl/Options
- tuts/python3/stdlib_module/ssl/PEM_cert_to_DER_cert
- tuts/python3/stdlib_module/ssl/Purpose
- tuts/python3/stdlib_module/ssl/RAND_add
- tuts/python3/stdlib_module/ssl/RAND_bytes
- tuts/python3/stdlib_module/ssl/RAND_status
- tuts/python3/stdlib_module/ssl/socket
- tuts/python3/stdlib_module/ssl/socket_error
- tuts/python3/stdlib_module/ssl/SSLCertVerificationError
- tuts/python3/stdlib_module/ssl/SSLContext
- tuts/python3/stdlib_module/ssl/SSLEOFError
- tuts/python3/stdlib_module/ssl/SSLError
- tuts/python3/stdlib_module/ssl/SSLErrorNumber
- tuts/python3/stdlib_module/ssl/SSLObject
- tuts/python3/stdlib_module/ssl/SSLSession
- tuts/python3/stdlib_module/ssl/SSLSocket
- tuts/python3/stdlib_module/ssl/SSLSyscallError
- tuts/python3/stdlib_module/ssl/SSLWantReadError
- tuts/python3/stdlib_module/ssl/SSLWantWriteError
- tuts/python3/stdlib_module/ssl/SSLZeroReturnError
Related notes
- tuts/python3/stdlib_module/ssl/cert_time_to_seconds Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/CertificateError Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/create_connection Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/create_default_context 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/DefaultVerifyPaths links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/DER_cert_to_PEM_cert links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_default_verify_paths links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_protocol_name links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_server_certificate links to this page; shared tags: #ssl, #stdlib