def load_crl(type, buffer):
 if isinstance(buffer, _text_type):
  buffer = buffer.encode('ascii')
 bio = _new_mem_buf(buffer)
 if (type == FILETYPE_PEM):
  crl = _lib.PEM_read_bio_X509_CRL(bio, _ffi.NULL, _ffi.NULL, _ffi.NULL)
 elif (type == FILETYPE_ASN1):
  crl = _lib.d2i_X509_CRL_bio(bio, _ffi.NULL)
 else:
  raise ValueError('type argument must be FILETYPE_PEM or FILETYPE_ASN1')
 if (crl == _ffi.NULL):
  _raise_current_error()
 result = CRL.__new__(CRL)
 result._crl = crl
 return result

def load_crl ( type , buffer ) : if isinstance ( buffer , _text_type ) : buffer = buffer . encode ( 'ascii' ) bio = _new_mem_buf ( buffer ) if ( type == FILETYPE_PEM ) : crl = _lib . PEM_read_bio_X509_CRL ( bio , _ffi . NULL , _ffi . NULL , _ffi . NULL ) elif ( type == FILETYPE_ASN1 ) : crl = _lib . d2i_X509_CRL_bio ( bio , _ffi . NULL ) else : raise ValueError ( 'type argument must be FILETYPE_PEM or FILETYPE_ASN1' ) if ( crl == _ffi . NULL ) : _raise_current_error ( ) result = CRL . __new__ ( CRL ) result . _crl = crl return result
load a certificate revocation list from a buffer .