How to verify if signature in pdf has expired?

Hi,
In my application I need to re-signature all documents that have expired certificates.
How can I check if document's signature's certificate has expired?



3 Replies

PK Prakash Kumar D Syncfusion Team September 25, 2018 11:18 AM UTC

Hi Jan, 
 
Please find the below details. 
 
In my application I need to re-signature all documents that have expired certificates. 
 
We can add a digital signature (re-sign) in existing PDF documents by using the following code example. 
 
//Loads the PDF document with signature field. 
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf"); 
 
//Set incremental update 
loadedDocument.FileStructure.IncrementalUpdate = false; 
 
//Gets the page. 
PdfLoadedPage page = loadedDocument.Pages[0] as PdfLoadedPage; 
 
//Get the existing signature field. 
PdfLoadedSignatureField signatureField = loadedDocument.Form.Fields[0] as PdfLoadedSignatureField; 
 
//Create a new PDF certificate. 
PdfCertificate certificate = new PdfCertificate(@"PDF.pfx", "syncfusion"); 
 
//Create new PdfSignature. 
signatureField.Signature = new PdfSignature(loadedDocument, page, certificate, "signature1", signatureField); 
 
//Saves the certified PDF document. 
loadedDocument.Save(@"Output.pdf"); 
 
//Close the document. 
loadedDocument.Close(true);    
                        
 
 
How can I check if document's signature's certificate has expired? 
 
 
Currently, we do not have support for retrieving certificate details from existing signed PDF documents. We will include this feature in our Volume 4 main release, which will be available in December 2018 tentatively. 
 
 
Regards, 
Prakash Kumar 



JG Jan Grzybowski September 26, 2018 11:36 AM UTC

Do you have more percise date of the update?
New law regulations are comming in January 2019 and we want to prepare for them.


PK Prakash Kumar D Syncfusion Team September 27, 2018 09:12 AM UTC

Hi Jan, 
 
Thank you for updating us. 
 
A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates 
  
  
Please let me know if you have any questions. 
 
Regards, 
Prakash Kumar 


Loader.
Up arrow icon