On this page
ssl.SSLWantReadError
Prev: ssl.SSLSyscallError | Up: ssl | Next: ssl.SSLWantWriteError
Rel: ssl.AlertDescription, ssl.cert_time_to_seconds, ssl.CertificateError, ssl.create_connection
Ref: docs.python.org โ ssl.SSLWantReadError
Tags: #public #python3 #stdlib #ssl
Import
import ssl
from ssl import SSLWantReadError
Signature & Overview
ssl.SSLWantReadError(...)
Non-blocking SSL socket needs to read more data before the requested operation can be completed.
Methods & Attributes
SSLWantReadError.add_note(self, note, /)โ Add a note to the exceptionSSLWantReadError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import ssl
ctx = ssl.create_default_context()
obj = ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO(), server_hostname="example.com")
try:
obj.do_handshake()
except ssl.SSLWantReadError:
assert True
Gotchas
- Normal on non-blocking sockets /
MemoryBIO: Signals that OpenSSL needs more encrypted bytes from the peer before retrying the call.
REPL Inspect
from ssl import SSLWantReadError
help(SSLWantReadError)
Linked from
Related notes
- tuts/python3/stdlib_module/ssl/SSLSyscallError Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/SSLWantWriteError 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