Add long term validation for a specified signature to the Document Security Store.




void AddLongTermValidation(Signature signature, Uri tsaUri, Oid digestAlgorithm)

[Visual Basic]
Sub AddLongTermValidation(signature As Signature, tsaUri As Uri, digestAlgorithm As Oid)



Name Description
signature The signature for which to add the long term validation.
tsaUri An optional timestamp server to timestamp the long term validation information. May be null.
digestAlgorithm The hash algorithm to use to create the digest of the signature to be timestamped where tsaUri is specified.




This method adds the signature's signing certificate chain to the Document Security Store (DSS) dictionary and the signature's Validation Related Information (VRI) dictionary. The certificate chain is extracted from the signature CMS and each certificate except the root certificate is checked for revocation.

Set the Signature.DocumentSecurityStorePolicy property to control the tpe of revocation information added to the DSS.




The following example shows how to add long-term validation to an existing signed signature called "Signature1", prefering OCSP responses over CRLs.

using(Doc doc = new Doc()) {
  Signature theSig = (Signature)doc.Form.Fields["Signature1"];
  theSig.DocumentSecurityStorePolicy = Signature.RevocationCheckingPolicy.PreferOCSP;
  FormOperation formOp = new FormOperation(doc);
  formOp.AddLongTermValidation(theSig, null, null);

[Visual Basic]
Dim doc As Doc = New Doc()
Dim theSig As Signature = CType(doc.Form.Fields("Signature1"),Signature)
theSig.DocumentSecurityStorePolicy = Signature.RevocationCheckingPolicy.PreferOCSP
Dim formOp As FormOperation = New FormOperation(doc)
formOp.AddLongTermValidation(theSig, Nothing, Nothing)