I have a question: I want to get from a signed email (Italian PEC), the expiration of the certificate use to sign or the expiration of the sign.
Is it possible with your library?
I wish you happy new year.
Thanks and kind regards.
You can use IMail.GetSignedCms() to get SignedCms instance and then use its Certificates property.
foreach (var certificate in signedCms.Certificates) { Console.WriteLine("IssuerName.Name " + certificate.IssuerName.Name); Console.WriteLine("SubjectName.Name " + certificate.SubjectName.Name); Console.WriteLine(certificate.GetExpirationDateString()); }