Exemplo n.º 1
0
 /// <summary>
 ///     Create publication based verification policy.
 /// </summary>
 public PublicationBasedVerificationPolicy()
 {
     FirstRule = new InternalVerificationPolicy()
                 .OnSuccess(new UserProvidedPublicationExistenceRule()
                            .OnSuccess(new UserProvidedPublicationBasedVerificationPolicy())
                            .OnNa(new PublicationsFileVerificationPolicy()));
 }
Exemplo n.º 2
0
        /// <summary>
        ///     Create calendar based verification policy with given rules.
        /// </summary>
        public CalendarBasedVerificationPolicy()
        {
            VerificationRule verificationRule = new ExtendedSignatureCalendarChainInputHashRule()                    // Cal-02
                                                .OnSuccess(new ExtendedSignatureCalendarChainAggregationTimeRule()); // Cal-03

            FirstRule = new InternalVerificationPolicy()
                        .OnSuccess(new CalendarHashChainExistenceRule()                                         // // Gen-02
                                   .OnSuccess(new SignaturePublicationRecordExistenceRule()                     // Gen-02
                                              .OnSuccess(new ExtendedSignatureCalendarChainRootHashRule()       // Cal-01
                                                         .OnSuccess(verificationRule))
                                              .OnNa(new ExtendedSignatureCalendarHashChainRightLinksMatchRule() // Cal-4
                                                    .OnSuccess(verificationRule)))
                                   .OnNa(verificationRule));
        }
Exemplo n.º 3
0
 /// <summary>
 ///     Create key based verification policy.
 /// </summary>
 public KeyBasedVerificationPolicy()
 {
     FirstRule = new InternalVerificationPolicy()
                 .OnSuccess(GetRules());
 }