Hello!
A PDF file that was successfully signed using the PdfSignature class cannot be validates afterwards.
The digital ID used to sign the PDF is a self-signed one, created with the elliptic curve encryption algorithm and SHA-256 as the digest algorithm.
The simplified code I'm using for validation is:
var doc = new PdfLoadedDocument(filename);
var sf = form.Fields[0] as PdfLoadedSignatureField;
var result = sf.ValidateSignature();
The 'result' variable after the validation contains:
The collection 'SignatureValidationErrors' contains one item with the text "The document has been altered or corrupted since the signature was applied".
As a side note, the file was not modified after being signed; also when opening the PDF in Adobe the signature is validated without problems.
I'm attaching a sample PDF file for you to check.
Can you please confirm if this is a bug with ECDSA-sha256 signed files? I'm using SF version 20.1.0.56
Thank you
Alex
Hi Alejandro,
We were able to reproduce the reported issue with provided
details on our end. Currently, we are validating on this and we will update the
further details on May 25th 2022.
Regards,
Gowthamraj K
Hi Alejandro,
We confirmed the issue “PDF signature validation fails when verifying digitally signed with the ECDSA-SHA256 algorithm” as a defect in our product. Since you are using a weekly NuGet release version, we will include the fix for this issue in our weekly NuGet release, which will be available on June 7th, 2022.
Please use the below feedback link to track the status of the reported bug.
Note: If you require patch for the reported issue in any of our Essential Studio Main or SP release version, then kindly let us know the version, so that we can provide a patch in that version based on our SLA policy.
Please let us know if you need any further assistance in this.
Regards,
Gowthamraj K
Hello Gowthamraj,
Thank you for your feedback on the reported issue.
I'll be waiting for the weekly nuget release on june 7th.
Regards,
Alex
Hi Alejandro,
We have included the fix for the reported issue “PDF signature validation fails when verifying digitally signed with the ECDSA-SHA256 algorithm” in our latest weekly NuGet release (v20.1.0.59). Please use the below link to download our latest weekly NuGet,
https://www.nuget.org/packages/Syncfusion.Pdf.AspNet.Mvc5/20.1.0.59
Please let us know if you have any concerns about
this
Regards,
Gowthamraj K
Hello Gowthamraj,
I made a test with the weekly release 20.1.0.59 and the validation of document signed with ECDSA was successful.
Thank you for your support
Regards
Alex
Hi Alejandro,
Thank you for your update. We are glad to know that the reported issue is resolved.
Please let us know if you need any further assistance in this.
Regards,
Gowthamraj K