Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « ssl »

Liste des classes du module ssl

Nom de la classe Description
AlertDescription An enumeration. [extrait de AlertDescription.__doc__]
DefaultVerifyPaths DefaultVerifyPaths(cafile, capath, openssl_cafile_env, openssl_cafile, openssl_capath_env, openssl_capath) [extrait de DefaultVerifyPaths.__doc__]
MemoryBIO
Options An enumeration. [extrait de Options.__doc__]
Purpose SSLContext purpose flags with X509v3 Extended Key Usage objects [extrait de Purpose.__doc__]
socket A subclass of _socket.socket adding the makefile() method. [extrait de socket.__doc__]
SSLContext An SSLContext holds various SSL-related configuration options and [extrait de SSLContext.__doc__]
SSLErrorNumber An enumeration. [extrait de SSLErrorNumber.__doc__]
SSLObject This class implements an interface on top of a low-level SSL object as [extrait de SSLObject.__doc__]
SSLSession
SSLSocket This class implements a subtype of socket.socket that wraps [extrait de SSLSocket.__doc__]
TLSVersion An enumeration. [extrait de TLSVersion.__doc__]
VerifyFlags An enumeration. [extrait de VerifyFlags.__doc__]
VerifyMode An enumeration. [extrait de VerifyMode.__doc__]

Liste des exceptions du module ssl

Nom de la classe d'exception Description
SSLCertVerificationError A certificate could not be verified. [extrait de SSLCertVerificationError.__doc__]
SSLEOFError SSL/TLS connection terminated abruptly. [extrait de SSLEOFError.__doc__]
SSLError An error occurred in the SSL implementation. [extrait de SSLError.__doc__]
SSLSyscallError System error when attempting SSL operation. [extrait de SSLSyscallError.__doc__]
SSLWantReadError Non-blocking SSL socket needs to read more data [extrait de SSLWantReadError.__doc__]
SSLWantWriteError Non-blocking SSL socket needs to write more data [extrait de SSLWantWriteError.__doc__]
SSLZeroReturnError SSL/TLS session closed cleanly. [extrait de SSLZeroReturnError.__doc__]

Liste des fonctions du module ssl

Signature de la fonction Description
cert_time_to_seconds(cert_time) Return the time in seconds since the Epoch, given the timestring [extrait de cert_time_to_seconds.__doc__]
create_connection(address, timeout=<object object at 0x7f721bac45e0>, source_address=None, *, all_errors=False) Connect to *address* and return the socket object. [extrait de create_connection.__doc__]
create_default_context(purpose=<Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>, *, cafile=None, capath=None, cadata=None) Create a SSLContext object with default settings. [extrait de create_default_context.__doc__]
DER_cert_to_PEM_cert(der_cert_bytes) Takes a certificate in binary DER format and returns the [extrait de DER_cert_to_PEM_cert.__doc__]
get_default_verify_paths() Return paths to default cafile and capath. [extrait de get_default_verify_paths.__doc__]
get_protocol_name(protocol_code)
get_server_certificate(addr, ssl_version=<_SSLMethod.PROTOCOL_TLS_CLIENT: 16>, ca_certs=None, timeout=<object object at 0x7f721bac45e0>) Retrieve the certificate from the server at the specified address, [extrait de get_server_certificate.__doc__]
match_hostname(cert, hostname) Verify that *cert* (in decoded format as returned by [extrait de match_hostname.__doc__]
namedtuple(typename, field_names, *, rename=False, defaults=None, module=None) Returns a new subclass of tuple with named fields. [extrait de namedtuple.__doc__]
PEM_cert_to_DER_cert(pem_cert_string) Takes a certificate in ASCII PEM format and returns the [extrait de PEM_cert_to_DER_cert.__doc__]
RAND_add(string, entropy) Mix string into the OpenSSL PRNG state. [extrait de RAND_add.__doc__]
RAND_bytes(n) Generate n cryptographically strong pseudo-random bytes. [extrait de RAND_bytes.__doc__]
RAND_pseudo_bytes(n) Generate n pseudo-random bytes. [extrait de RAND_pseudo_bytes.__doc__]
RAND_status() Returns True if the OpenSSL PRNG has been seeded with enough data and False if not. [extrait de RAND_status.__doc__]
wrap_socket(sock, keyfile=None, certfile=None, server_side=False, cert_reqs=<VerifyMode.CERT_NONE: 0>, ssl_version=<_SSLMethod.PROTOCOL_TLS: 2>, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True, ciphers=None)

Liste des variables globales du module ssl

Nom de la variable globale Valeur
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
CHANNEL_BINDING_TYPES ['tls-unique']
HAS_ALPN True
HAS_ECDH True
HAS_NEVER_CHECK_COMMON_NAME True
HAS_NPN False
HAS_SNI True
HAS_SSLv2 False
HAS_SSLv3 False
HAS_TLSv1 True
HAS_TLSv1_1 True
HAS_TLSv1_2 True
HAS_TLSv1_3 True
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
OPENSSL_VERSION OpenSSL 3.0.8 7 Feb 2023
OPENSSL_VERSION_INFO (3, 0, 0, 8, 0)
OPENSSL_VERSION_NUMBER 805306496
PEM_FOOTER -----END CERTIFICATE-----
PEM_HEADER -----BEGIN CERTIFICATE-----
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
SO_TYPE 3
SOCK_STREAM 1
SOL_SOCKET 1
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

Liste des alias du module ssl

Nom de l'alias Définition ciblée
CertificateError SSLCertVerificationError
socket_error OSError