/// <summary> /// Create publication based verification policy. /// </summary> public PublicationBasedVerificationPolicy() { FirstRule = new InternalVerificationPolicy() .OnSuccess(new UserProvidedPublicationExistenceRule() .OnSuccess(new UserProvidedPublicationBasedVerificationPolicy()) .OnNa(new PublicationsFileVerificationPolicy())); }
/// <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)); }
/// <summary> /// Create key based verification policy. /// </summary> public KeyBasedVerificationPolicy() { FirstRule = new InternalVerificationPolicy() .OnSuccess(GetRules()); }