Пример #1
0
        public bool CheckSignatureReturningKey(out AsymmetricAlgorithm signingKey)
        {
            SignedXmlDebugLog.LogBeginSignatureVerification(this, _context);

            signingKey = null;
            bool bRet = false;
            AsymmetricAlgorithm key = null;

            if (!CheckSignatureFormat())
            {
                return(false);
            }

            do
            {
                key = GetPublicKey();
                if (key != null)
                {
                    bRet = CheckSignature(key);
                    SignedXmlDebugLog.LogVerificationResult(this, key, bRet);
                }
            } while (key != null && bRet == false);

            signingKey = key;
            return(bRet);
        }
        public bool CheckSignatureReturningKey(out AsymmetricAlgorithm signingKey)
        {
            SignedXmlDebugLog.LogBeginSignatureVerification(this, this.m_context);
            signingKey = null;
            bool verified           = false;
            AsymmetricAlgorithm key = null;

            if (!this.CheckSignatureFormat())
            {
                return(false);
            }
            do
            {
                key = this.GetPublicKey();
                if (key != null)
                {
                    verified = this.CheckSignature(key);
                    SignedXmlDebugLog.LogVerificationResult(this, key, verified);
                }
            }while ((key != null) && !verified);
            signingKey = key;
            return(verified);
        }