1

Where can I get the date and the time of a signature? Now I get the certificate information with this code:

var signer = X509Certificate2.CreateFromSignedFile(fileName);
var certificate = new X509Certificate2(signer);

And I can read some properties, but I cannot find WHEN the file was signed.

Thank you

skysurfer
  • 721
  • 2
  • 5
  • 23
  • 2
    Are you sure that that is recorded? You can of course get the NotBefore/NotAfter stamps quite easily. – bommelding May 17 '18 at 09:48
  • Yes. It is recorder. I opened the file with a software that checks digital signature and it show the Signature date. – skysurfer May 17 '18 at 12:19
  • Can you document that? Name+version of that software, screenshot maybe. Also: do all certificates have this date? Check a few. – bommelding May 17 '18 at 13:21
  • 1
    No, it is not recorded in the X509Certificate. You are thinking of something else, a signature on a Windows file that follows some standard like Authenticode(old name, I have no idea what they call it nowdays). That uses a version of PKCS#7 to store the certificate as well as a second signature by a timestamping authority containing a timestamp. – President James K. Polk May 17 '18 at 13:22
  • Thank you James. You are right, but I cannot find the method to extract this information neither using the System.Security.Cryptography.Pkcs library – skysurfer May 17 '18 at 13:34
  • Does this answer your question? [How do I read the digital signature information from a signed .Net assembly?](https://stackoverflow.com/questions/10549836/how-do-i-read-the-digital-signature-information-from-a-signed-net-assembly) – Orace Dec 18 '19 at 09:35

0 Answers0