예제 #1
0
        public void LoadXml(XmlElement value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }

            signatureElement = value;
            m_signature.LoadXml(value);

            if (_context == null)
            {
                _context = value;
            }

            // Need to give the EncryptedXml object to the
            // XmlDecryptionTransform to give it a fighting
            // chance at decrypting the document.
            foreach (Reference r in m_signature.SignedInfo.References)
            {
                foreach (Transform t in r.TransformChain)
                {
                    if (t is XmlDecryptionTransform)
                    {
                        ((XmlDecryptionTransform)t).EncryptedXml = EncryptedXml;
                    }
                }
            }
        }
예제 #2
0
        public void LoadXml(XmlElement value)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            m_signature.LoadXml(value);

            if (_context == null)
            {
                _context = value;
            }

            _bCacheValid = false;
        }
예제 #3
0
        /// <include file='doc\SignedXml.uex' path='docs/doc[@for="SignedXml.LoadXml"]/*' />
        public void LoadXml(XmlElement value)
        {
            // Guard against nulls
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }

            // Validate against DTD -- future hook
            // NOTE -- We might now be able to use this since our imlementation
            // of the KeyValue under KeyInfo is not what the spec exaclty specifies.
            // We can probably provide our own custom DTD in order to do the check
            // but we might reject some signature that the spec considers valid
            //ValidateXml(value);
            m_signature.LoadXml(value);
        }