Ejemplo n.º 1
0
        public void VerifyTrust(TrustModel trust)
        {
            var schema = new TrustSchema(trust);

            if (!schema.Validate())
            {
                var msg = string.Join(". ", schema.Errors.ToArray());
                throw new ApplicationException(msg);
            }

            var signature = new TrustECDSASignature(trust);
            var errors    = signature.VerifyTrustSignatureMessage();

            if (errors.Count > 0)
            {
                throw new ApplicationException(string.Join(". ", errors.ToArray()));
            }
        }