def load_crl_string(crl_string): """ Load CRL from a string. @type string: string @param string: String containing a CRL in PEM format. @rtype: M2Crypto.X509.X509_CRL @return: M2Crypto.X509.X509_CRL object. """ bio = BIO.MemoryBuffer(crl_string) cptr=m2.x509_crl_read_pem(bio._ptr()) if cptr is None: raise X509Error(Err.get_error()) return CRL(cptr, 1)
def load_crl(file): """ Load CRL from file. @type file: string @param file: Name of file containing CRL in PEM format. @rtype: M2Crypto.X509.CRL @return: M2Crypto.X509.CRL object. """ f=BIO.openfile(file) cptr=m2.x509_crl_read_pem(f.bio_ptr()) f.close() if cptr is None: raise X509Error(Err.get_error()) return CRL(cptr, 1)
def load_crl(file): """ Load CRL from file. @type file: string @param file: Name of file containing CRL in PEM format. @rtype: M2Crypto.X509.CRL @return: M2Crypto.X509.CRL object. """ f = BIO.openfile(file) cptr = m2.x509_crl_read_pem(f.bio_ptr()) f.close() if cptr is None: raise Err.get_error() return CRL(cptr, 1)