Save document hangs when using certain timestamp servers

Hello,

When running following code the system hangs on the line document.Save.

Sample:
    class Program
    {
        static void Main(string[] args)
        {
            //Create PDF
            using (PdfDocument document = new PdfDocument())
            {
                //Load certificate
                PdfCertificate pdfCert = null;
                using (FileStream certificateStream1 = new FileStream(@"certificate.pfx", FileMode.Open, FileAccess.Read))
                {
                    pdfCert = new PdfCertificate(certificateStream1, "password");
                }

                //Add a page to the document.
                PdfPage page = document.Pages.Add();

                //Draw the text.
                page.Graphics.DrawString("Hello World!!!", new PdfStandardFont(PdfFontFamily.Helvetica, 20), PdfBrushes.Black, new Syncfusion.Drawing.PointF(0, 0));

                //Creates a digital signature.
                PdfSignature signature = new PdfSignature(document, page, pdfCert, "Signature");
                signature.TimeStampServer = new TimeStampServer(new Uri(@"http://timestamp.entrust.net/TSS/RFC3161sha2TS"));
                signature.EnableLtv = true;

                //Save to file system
                using (Stream tempPdfNameStream = new FileStream("file.pdf", FileMode.Create))
                {
                    document.Save(tempPdfNameStream); //The program keeps hanging on this line.
                }
                document.Close();
            }
        }
    }

4 Replies

SL Sowmiya Loganathan Syncfusion Team February 13, 2020 01:13 PM UTC

Hi Jeffrey,  
 
Thank you for contacting Syncfusion support.  
 
We have checked the reported issue “Save document hangs on particular timestamp server” and suspect that this may occur due to invalid timestamp server (http://timestamp.entrust.net/TSS/RFC3161sha2TS). Please refer the below screenshot for your reference,    
   
    
Note: We have tried the same code snippet with another timestamp and it works fine without any issue.    
   
However currently, we are validating on this and provide further details on 17th February 2020.    
   
Please let us know if you have any concerns on this.    
 
Regards, 
Sowmiya Loganathan 
 
 
 



JE Jeffrey February 13, 2020 01:29 PM UTC

Hello,

The message in the browser windows is normal because no correct data is sent to timestamp server.
We are using this timestamp server in another program (that is not made by us) and there it is working.
I also assume that if the timestamp server is invalid that we get an exception in our application and not that the application hangs forever.

Regards,
Jeffrey


SL Sowmiya Loganathan Syncfusion Team February 14, 2020 10:20 AM UTC

Hi Jeffery,   
   
Thank you for the information.     
As promised earlier, we will update the validation details for the reported issue “Save document hangs on particular timestamp server” on 17th February 2020.  
 
Regards, 
Sowmiya Loganathan 



SL Sowmiya Loganathan Syncfusion Team February 17, 2020 12:28 PM UTC

Hi Jeffrey, 
 
We have confirmed that the issue with “Save document hangs on particular timestamp server while signing PDF document” is a defect. The fix for this issue will be included in our upcoming weekly NuGet release which is expected to available on 25th February, 2020.  
 
Regards, 
Sowmiya Loganathan 


Loader.
Up arrow icon