l.c.b.LibcloudHTTPSConnection(httplib.HTTPSConnection) : class documentation

Part of libcloud.compute.base View Source View In Hierarchy

Known subclasses: libcloud.common.base.LoggingHTTPSConnection

LibcloudHTTPSConnection

Subclass of HTTPSConnection which verifies certificate names
if and only if CA certificates are available.
Method __init__ Constructor
Method connect Connect
Method _setup_verify Setup Verify SSL or not
Method _setup_ca_cert Setup CA Certs
Method _verify_hostname Verify hostname against peer cert
Method _get_subject_alt_names Get SubjectAltNames
Method _get_common_name Get Common Name
def __init__(self, *args, **kwargs): (source)
Constructor
        
def _setup_verify(self): (source)
Setup Verify SSL or not

Reads security module's VERIFY_SSL_CERT and toggles whether
the class overrides the connect() class method or runs the
inherited httplib.HTTPSConnection connect()
def _setup_ca_cert(self): (source)
Setup CA Certs

Search in CA_CERTS_PATH for valid candidates and
return first match.  Otherwise, complain about certs
not being available.
def connect(self): (source)
Connect

Checks if verification is toggled; if not, just call
httplib.HTTPSConnection's connect
def _verify_hostname(self, hostname, cert): (source)
Verify hostname against peer cert

Check both commonName and entries in subjectAltName, using a
rudimentary glob to dns regex check to find matches
def _get_subject_alt_names(self, cert): (source)
Get SubjectAltNames

Retrieve 'subjectAltName' attributes from cert data structure
def _get_common_name(self, cert): (source)
Get Common Name

Retrieve 'commonName' attribute from cert data structure
API Documentation for libcloud, generated by pydoctor at 2013-07-01 17:02:02.