'Extract the OCSP server host from a certificate.
:param str cert_path: Path to the cert we\'re checking OCSP for
:rtype tuple:
:returns: (OCSP server URL or None, OCSP server host or None)'

def determine_ocsp_server(self, cert_path):

    try:
        (url, _err) = util.run_script(['openssl', 'x509', '-in', cert_path, '-noout', '-ocsp_uri'], log=logger.debug)
    except errors.SubprocessError:
        logger.info('Cannot    extract    OCSP    URI    from    %s', cert_path)
        return (None, None)
    url = url.rstrip()
    host = url.partition('://')[2].rstrip('/')
    if host:
        return (url, host)
    else:
        logger.info('Cannot    process    OCSP    host    from    URL    (%s)    in    cert    at    %s', url, cert_path)
        return (None, None)
