def revoke_cert(project_id, file_name):
    """Revoke a cert by file name."""
    try:
        # NOTE(vish): potential race condition here
        utils.execute('openssl', 'ca', '-config', './openssl.cnf', '-revoke',
                      file_name, cwd=ca_folder(project_id))
        utils.execute('openssl', 'ca', '-gencrl', '-config', './openssl.cnf',
                      '-out', CONF.crypto.crl_file, cwd=ca_folder(project_id))
    except __HOLE__:
        raise exception.ProjectNotFound(project_id=project_id)
    except processutils.ProcessExecutionError:
        raise exception.RevokeCertFailure(project_id=project_id)
dataset/ETHPy150Open openstack/nova/nova/crypto.py/revoke_cert