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 |
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()
Setup CA Certs Search in CA_CERTS_PATH for valid candidates and return first match. Otherwise, complain about certs not being available.
Connect Checks if verification is toggled; if not, just call httplib.HTTPSConnection's connect
Verify hostname against peer cert Check both commonName and entries in subjectAltName, using a rudimentary glob to dns regex check to find matches
Get SubjectAltNames Retrieve 'subjectAltName' attributes from cert data structure
Get Common Name Retrieve 'commonName' attribute from cert data structure