def generateChainFromRequestString( self, pemData, lifetime = 86400, requireLimited = False, diracGroup = False, rfc = False ): """ Generate a x509 chain from a request return S_OK( string ) / S_ERROR """ if not self.__loadedChain: return S_ERROR( "No chain loaded" ) if not self.__loadedPKey: return S_ERROR( "No pkey loaded" ) try: req = crypto.load_certificate_request( crypto.FILETYPE_PEM, pemData ) except Exception, e: return S_ERROR( "Can't load request data: %s" % str( e ) )
def generateChainFromRequestString( self, pemData, lifetime = 86400, requireLimited = False, diracGroup = False ): """ Generate a x509 chain from a request return S_OK( string ) / S_ERROR """ if not self.__loadedChain: return S_ERROR( "No chain loaded" ) if not self.__loadedPKey: return S_ERROR( "No pkey loaded" ) try: req = crypto.load_certificate_request( crypto.FILETYPE_PEM, pemData ) except Exception, e: return S_ERROR( "Can't load request data: %s" % str( e ) )
def generateChainFromRequestString(self, pemData, lifetime=86400, requireLimited=False, diracGroup=False, rfc=True): """ Generate a x509 chain from a request return S_OK( string ) / S_ERROR """ if not self.__loadedChain: return S_ERROR(DErrno.ENOCHAIN) if not self.__loadedPKey: return S_ERROR(DErrno.ENOPKEY) try: req = crypto.load_certificate_request(crypto.FILETYPE_PEM, pemData) except Exception as e: return S_ERROR(DErrno.ECERTREAD, "Can't load request data: %s" % repr(e).replace(',)', ')')) limited = requireLimited and self.isLimitedProxy().get('Value', False) return self.generateProxyToString(lifetime, diracGroup, 1024, limited, rfc, req.get_pubkey())
def generateChainFromRequestString( self, pemData, lifetime = 86400, requireLimited = False, diracGroup = False, rfc = False ): """ Generate a x509 chain from a request return S_OK( string ) / S_ERROR """ if not self.__loadedChain: return S_ERROR( DErrno.ENOCHAIN ) if not self.__loadedPKey: return S_ERROR( DErrno.ENOPKEY ) try: req = crypto.load_certificate_request( crypto.FILETYPE_PEM, pemData ) except Exception as e: return S_ERROR( DErrno.ECERTREAD, "Can't load request data: %s" % repr( e ).replace( ',)', ')' ) ) limited = requireLimited and self.isLimitedProxy().get( 'Value', False ) return self.generateProxyToString( lifetime, diracGroup, 1024, limited, rfc, req.get_pubkey() )