Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake). Only 'tls-unique' channel binding data from RFC 5929 is supported.getpeercert($self, der=False, /) --
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.pending($self, /) --
Returns the number of already decrypted bytes available for read, pending on the connection.read(size, [buffer]) Read up to size bytes from the SSL socket.write($self, b, /) --
Writes the bytes-like object b into the SSL object.
Returns the number of bytes written.do_handshake($self, /) --
Control the number of TLSv1.3 session ticketsSet 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.get_ciphers($self, /) --
get_ca_certs($self, /, binary_form=False) --
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.cert_store_stats($self, /) --
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.set_ecdh_curve($self, name, /) --
Whether the memory BIO is at EOF.The number of bytes pending in the memory BIO.write_eof($self, /) --
Write an EOF marker to the memory BIO.
When all data has been read, the "eof" property will be True.write($self, b, /) --
Writes the bytes b into the memory BIO.
Returns the number of bytes written.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.Session timeout (delta in seconds).Session creation time (seconds since epoch).Ticket life time hint.Session idDoes the session contain a ticket?nid2obj($module, nid, /) --
Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID.txt2obj($module, /, 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.get_default_verify_paths($module, /) --
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'.RAND_status($module, /) --
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.RAND_pseudo_bytes($module, n, /) --
Generate n pseudo-random bytes.
Return a pair (bytes, is_cryptographic). is_cryptographic is True if the bytes generated are cryptographically strong.RAND_bytes($module, n, /) --
Generate n cryptographically strong pseudo-random bytes.RAND_add($module, 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._test_decode_cert($module, path, /) --