Hi,
We are using Aspose to sign PDF document using certificate generated by our pki.
Certificate are stored for reuse purpose to a DB, Cert & Private Key
Since now, we are using .net 4.x and PdfFileSignature to sign, it works well.
Now we need to move forward to .Net Core framework, and think change a bit.
In .Net 4.5, we set private key of the X509Certificate2 directly.
With .Net Core, we need to use certificate.CopyWithPrivateKey() method, which change the private key signature from System.Security.Cryptography.RSACryptoServiceProvider to System.Security.Cryptography.RSACng.
When signing the PDF with this certificate, no issue. But when you open the result PDF, Adobe cannot verify the signature and raise a cryptographic error.
I attach sample code, can be run in .net 4.x or .Net core, regarding thee choice the resulting PDF is valid or not.
Can you please advise if this is a Aspose Bug or if there’s some change available to solve this issue ?
Thanks
ECHR.SignCoreTest.zip (78.5 KB)