def sign_statement(self, statement, node_name, key_file, node_id,
                       id_attr, passphrase=None):

        _, fil = make_temp("%s" % statement, suffix=".xml", decode=False,
                           delete=self._xmlsec_delete_tmpfiles)

        com_list = [self.xmlsec, "--sign",
                    "--id-attr:%s" % id_attr, node_name]
        if node_id:
            com_list.extend(["--node-id", node_id])

        try:
            (stdout, stderr, signed_statement) = self._run_xmlsec(
                com_list, [fil], validate_output=False, key_file=key_file,
                passphrase=passphrase)
            # this doesn't work if --store-signatures are used
            if stdout == "":
                if signed_statement:
                    return signed_statement
            logger.error(
                "Signing operation failed :\nstdout : %s\nstderr : %s" % (
                    stdout, stderr))
            raise SigverError(stderr)
        except DecryptError:
            raise SigverError("Signing failed")
Creates a :class:`~flask.Response` with the JSON representation of
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/sigver.py/CryptoBackendXmlSec1.sign_statement--crossover with--dataset/ETHPy150Open hhstore/flask-annotated/flask-0.5/flask/helpers.py/jsonify