Part of libcloud.compute.base View Source View In Hierarchy
Known subclasses: libcloud.base.LoggingHTTPSConnection
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 |
Reads security module's VERIFY_SSL_CERT and toggles whether the class overrides the connect() class method or runs the inherited httplib.HTTPSConnection connect()
Search in CA_CERTS_PATH for valid candidates and return first match. Otherwise, complain about certs not being available.
Checks if verification is toggled; if not, just call httplib.HTTPSConnection's connect
Check both commonName and entries in subjectAltName, using a rudimentary glob to dns regex check to find matches
Retrieve 'subjectAltName' attributes from cert data structure
Retrieve 'commonName' attribute from cert data structure