def validate_signature(self, signedtext, cert_file, cert_type, node_name,
                           node_id, id_attr):
        _, fil = make_temp(signedtext, suffix=".xml",
                           decode=False, delete=self._xmlsec_delete_tmpfiles)

        com_list = [self.xmlsec, "--verify",
                    "--pubkey-cert-%s" % cert_type, cert_file,
                    "--id-attr:%s" % id_attr, node_name]

        if self.debug:
            com_list.append("--store-signatures")

        if node_id:
            com_list.extend(["--node-id", node_id])

        if self.__DEBUG:
            try:
                print " ".join(com_list)
            except TypeError:
                print "cert_type", cert_type
                print "cert_file", cert_file
                print "node_name", node_name
                print "fil", fil
                raise
            print "%s: %s" % (cert_file, os.access(cert_file, os.F_OK))
            print "%s: %s" % (fil, os.access(fil, os.F_OK))

        (_stdout, stderr, _output) = self._run_xmlsec(com_list, [fil],
                                                      exception=SignatureError)
        return parse_xmlsec_output(stderr)
Validate signature on XML document.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/sigver.py/CryptoBackendXmlSec1.validate_signature