def loadChainFromString( self, pemData ): """ Load a x509CRL certificate from a string containing the pem data Return : S_OK / S_ERROR """ self.__loadedCert = False try: self.__revokedCert = crypto.load_crl( crypto.FILETYPE_PEM, pemData ) except Exception as e: return S_ERROR( "Can't load pem data: %s" % str( e ) ) if not self.__revokedCert: return S_ERROR( "No certificates in the contents" ) self.__loadedCert = True self.__pemData = pemData return S_OK()
def loadChainFromString( self, pemData ): """ Load a x509CRL certificate from a string containing the pem data Return : S_OK / S_ERROR """ self.__loadedCert = False try: self.__revokedCert = crypto.load_crl( crypto.FILETYPE_PEM, pemData ) except Exception as e: return S_ERROR( DErrno.ECERTREAD, "%s" % repr( e ).replace( ',)', ')' ) ) if not self.__revokedCert: return S_ERROR( DErrno.ECERTREAD ) self.__loadedCert = True self.__pemData = pemData return S_OK()
def loadChainFromString(self, pemData): """ Load a x509CRL certificate from a string containing the pem data Return : S_OK / S_ERROR """ self.__loadedCert = False try: self.__revokedCert = crypto.load_crl(crypto.FILETYPE_PEM, pemData) except Exception as e: return S_ERROR("Can't load pem data: %s" % str(e)) if not self.__revokedCert: return S_ERROR("No certificates in the contents") self.__loadedCert = True self.__pemData = pemData return S_OK()