code: def verify_envelope(reply, key_file):
      
      doc = etree.fromstring(reply)
      node = doc.find(".//{%s}Signature" % xmlsec.DSigNs)
      if node is None:
          raise CertificationError("No signature node found")
      dsigCtx = xmlsec.DSigCtx()
  
      xmlsec.addIDs(doc, ['Id'])
      signKey = xmlsec.Key.load(key_file, xmlsec.KeyDataFormatPem)
      signKey.name = os.path.basename(key_file)
  
      dsigCtx.signKey = signKey
      try:
          dsigCtx.verify(node)
      except xmlsec.VerificationError:
          return False
      return True
docs: Verify that the given soap request is signed with the certificate