def cert_verify(self, conn, url, verify, cert):
if url.lower().startswith('<STR_LIT>') and verify:<EOL><INDENT>cert_loc = None<EOL>if verify is not True:<EOL><INDENT>cert_loc = verify<EOL><DEDENT>if not cert_loc:<EOL><INDENT>cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)<EOL><DEDENT>if not cert_loc or not os.path.exists(cert_loc):<EOL><INDENT>raise IOError("<STR_LIT>"<EOL>"<STR_LIT>".format(cert_loc))<EOL><DEDENT>conn.cert_reqs = '<STR_LIT>'<EOL>if not os.path.isdir(cert_loc):<EOL><INDENT>conn.ca_certs = cert_loc<EOL><DEDENT>else:<EOL><INDENT>conn.ca_cert_dir = cert_loc<EOL><DEDENT><DEDENT>else:<EOL><INDENT>conn.cert_reqs = '<STR_LIT>'<EOL>conn.ca_certs = None<EOL>conn.ca_cert_dir = None<EOL><DEDENT>if cert:<EOL><INDENT>if not isinstance(cert, basestring):<EOL><INDENT>conn.cert_file = cert[<NUM_LIT:0>]<EOL>conn.key_file = cert[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>conn.cert_file = cert<EOL>conn.key_file = None<EOL><DEDENT>if conn.cert_file and not os.path.exists(conn.cert_file):<EOL><INDENT>raise IOError("<STR_LIT>"<EOL>"<STR_LIT>".format(conn.cert_file))<EOL><DEDENT>if conn.key_file and not os.path.exists(conn.key_file):<EOL><INDENT>raise IOError("<STR_LIT>"<EOL>"<STR_LIT>".format(conn.key_file))<EOL><DEDENT><DEDENT>
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: Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use
        :param cert: The SSL certificate to verify.