The following example shows how to add long-term validation to
an existing signed signature called "Signature1", prefering OCSP
responses over CRLs.
[C#]
using(Doc doc = new Doc()) {
doc.Read("SignedDoc.pdf");
Signature theSig =
(Signature)doc.Form.Fields["Signature1"];
theSig.DocumentSecurityStorePolicy =
Signature.RevocationCheckingPolicy.PreferOCSP;
FormOperation formOp = new FormOperation(doc);
formOp.AddLongTermValidation(theSig, null, null);
doc.Save("LTVSignedDoc.pdf");
}
[Visual Basic]
Dim doc As Doc = New Doc()
doc.Read("SignedDoc.pdf")
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)
doc.Save("LTVSignedDoc.pdf")
|
|
|