OpenQuizz
Une application de gestion des contenus pédagogiques
SSLContext Class Reference
Inheritance diagram for SSLContext:
Collaboration diagram for SSLContext:

Public Member Functions

def __init__ (self, protocol)
 
def protocol (self)
 
def load_cert_chain (self, certfile, keyfile=None, password=None)
 
def load_verify_locations (self, cafile=None, capath=None)
 
def set_default_verify_paths (self)
 
def wrap_socket (self, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, session=None)
 

Properties

 verify_mode = property(__get_verify_mode, __set_verify_mode)
 
 check_hostname = property(__get_check_hostname, __set_check_hostname)
 
 check_ocsp_endpoint
 
 options = property(__get_options, __set_options)
 

Detailed Description

A CPython compatible SSLContext implementation wrapping PyOpenSSL's
context.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  protocol 
)

Member Function Documentation

◆ load_cert_chain()

def load_cert_chain (   self,
  certfile,
  keyfile = None,
  password = None 
)
Load a private key and the corresponding certificate. The certfile
string must be the path to a single file in PEM format containing the
certificate as well as any number of CA certificates needed to
establish the certificate's authenticity. The keyfile string, if
present, must point to a file containing the private key. Otherwise
the private key will be taken from certfile as well.

◆ load_verify_locations()

def load_verify_locations (   self,
  cafile = None,
  capath = None 
)
Load a set of "certification authority"(CA) certificates used to
validate other peers' certificates when `~verify_mode` is other than
ssl.CERT_NONE.

◆ protocol()

def protocol (   self)
The protocol version chosen when constructing the context.
This attribute is read-only.

◆ set_default_verify_paths()

def set_default_verify_paths (   self)
Specify that the platform provided CA certificates are to be used
for verification purposes.

◆ wrap_socket()

def wrap_socket (   self,
  sock,
  server_side = False,
  do_handshake_on_connect = True,
  suppress_ragged_eofs = True,
  server_hostname = None,
  session = None 
)
Wrap an existing Python socket sock and return a TLS socket
object.

Property Documentation

◆ check_hostname

check_hostname = property(__get_check_hostname, __set_check_hostname)
static

◆ check_ocsp_endpoint

check_ocsp_endpoint
static
Initial value:
= property(__get_check_ocsp_endpoint,
__set_check_ocsp_endpoint)

◆ options

options = property(__get_options, __set_options)
static

◆ verify_mode

verify_mode = property(__get_verify_mode, __set_verify_mode)
static

The documentation for this class was generated from the following file: