def pyopenssl_load_certificate(data):
 openssl_errors = []
 for file_type in (OpenSSL.crypto.FILETYPE_PEM, OpenSSL.crypto.FILETYPE_ASN1):
  try:
   return (OpenSSL.crypto.load_certificate(file_type, data), file_type)
  except OpenSSL.crypto.Error as error:
   openssl_errors.append(error)
 raise errors.Error('Unable to load: {0}'.format(','.join((str(error) for error in openssl_errors))))

def pyopenssl_load_certificate ( data ) : openssl_errors = [ ] for file_type in ( OpenSSL . crypto . FILETYPE_PEM , OpenSSL . crypto . FILETYPE_ASN1 ) : try : return ( OpenSSL . crypto . load_certificate ( file_type , data ) , file_type ) except OpenSSL . crypto . Error as error : openssl_errors . append ( error ) raise errors . Error ( 'Unable to load: {0}' . format ( ',' . join ( ( str ( error ) for error in openssl_errors ) ) ) )
load pem/der certificate .