'Verify a SSL certificate. This method should not be called from user
code, and is only exposed for use when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param conn: The urllib3 connection object associated with the cert.
:param url: The requested URL.
:param verify: Whether we should actually verify the certificate.
:param cert: The SSL certificate to verify.'

def cert_verify(self, conn, url, verify, cert):

    if (url.startswith('https') and verify):
        cert_loc = None
        if (verify is not True):
            cert_loc = verify
        if (not cert_loc):
            cert_loc = DEFAULT_CA_BUNDLE_PATH
        if (not cert_loc):
            raise Exception('Could    not    find    a    suitable    SSL    CA    certificate    bundle.')
        conn.cert_reqs = 'CERT_REQUIRED'
        conn.ca_certs = cert_loc
    else:
        conn.cert_reqs = 'CERT_NONE'
        conn.ca_certs = None
    if cert:
        if (not isinstance(cert, basestring)):
            conn.cert_file = cert[0]
            conn.key_file = cert[1]
        else:
            conn.cert_file = cert
