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, dummy=None)
 
def wrap_socket (self, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, dummy=None)
 

Properties

 verify_mode = property(__get_verify_mode, __set_verify_mode)
 

Detailed Description

A fake SSLContext.

This implements an API similar to ssl.SSLContext from python 3.2
but does not implement methods or properties that would be
incompatible with ssl.wrap_socket from python 2.7 < 2.7.9.

You must pass protocol which must be one of the PROTOCOL_* constants
defined in the ssl module. ssl.PROTOCOL_SSLv23 is recommended for maximum
interoperability.

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,
  dummy = 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.

◆ wrap_socket()

def wrap_socket (   self,
  sock,
  server_side = False,
  do_handshake_on_connect = True,
  suppress_ragged_eofs = True,
  dummy = None 
)
Wrap an existing Python socket sock and return an ssl.SSLSocket
object.

Property Documentation

◆ verify_mode

verify_mode = property(__get_verify_mode, __set_verify_mode)
static

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