def revoke_cert(project_id, file_name):
 try:
  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 OSError:
  raise exception.ProjectNotFound(project_id=project_id)
 except processutils.ProcessExecutionError:
  raise exception.RevokeCertFailure(project_id=project_id)

def revoke_cert ( project_id , file_name ) : try : 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 OSError : raise exception . ProjectNotFound ( project_id = project_id ) except processutils . ProcessExecutionError : raise exception . RevokeCertFailure ( project_id = project_id )
revoke a cert by file name .