def load_certificate_file(path):
 try:
  certificate_file = path.open()
 except IOError as e:
  (code, failure) = e
  raise PathError('Certificate file could not be opened.', e.filename, code, failure)
 certificate = Certificate.load(certificate_file.read(), format=crypto.FILETYPE_PEM)
 return certificate

def load_certificate_file ( path ) : try : certificate_file = path . open ( ) except IOError as e : ( code , failure ) = e raise PathError ( 'Certificate file could not be opened.' , e . filename , code , failure ) certificate = Certificate . load ( certificate_file . read ( ) , format = crypto . FILETYPE_PEM ) return certificate
load a certificate from a specified path .