private void ValiderKvitteringSignatur()
        {
            var standardBusinessDocumentNode =
                Respons.SelectSingleNode("/env:Envelope/env:Body/sbd:StandardBusinessDocument", _nsMgr);

            if (standardBusinessDocumentNode != null)
            {
                var standardBusinessDocument = XmlNodeToXmlDocument(standardBusinessDocumentNode);

                _signedXmlWithAgnosticId = new SignedXmlWithAgnosticId(standardBusinessDocument);
                _signaturnode            = (XmlElement)standardBusinessDocument.SelectSingleNode("//ds:Signature", _nsMgr);

                ValiderSignaturOgSertifikat("./ds:KeyInfo/ds:X509Data/ds:X509Certificate");
            }
            else
            {
                throw new SdpSecurityException("Fant ikke StandardBusinessDocument-node. Prøvde du å validere en transportkvittering?");
            }
        }
        private bool ValiderDigestElement(string sendtMeldingDigestSti, string mottattSvarDigestSti, string id, out string sendtMeldingDigest, out string mottattSvarDigest)
        {
            sendtMeldingDigest = null;
            mottattSvarDigest  = null;

            var sendtMeldingSelectedNode = SendtMelding.SelectSingleNode(string.Format(sendtMeldingDigestSti, id), _nsMgr);

            if (sendtMeldingSelectedNode != null)
            {
                sendtMeldingDigest = sendtMeldingSelectedNode.InnerText;
            }

            var responsSelectedNode = Respons.SelectSingleNode(string.Format(mottattSvarDigestSti, id), _nsMgr);

            if (responsSelectedNode != null)
            {
                mottattSvarDigest = responsSelectedNode.InnerText;
            }

            return(sendtMeldingDigest != null && responsSelectedNode != null && sendtMeldingDigest == mottattSvarDigest);
        }