0

I recently found here a very informative article about getting various informations from Authenticode signed executables:

Get timestamp from Authenticode Signed files in .NET

I managed how to retrieve TimeStamp date attribute but i don't know much about raw data conversion, and I assume it has to be done to convert that attribute from byte array to DateTime object.

Could anyone give me an example how to achive this in C#?

Thanks.

Community
  • 1
  • 1
dragon
  • 1
  • 1

1 Answers1

1

You can re-use the code from Mono's chktrust tool [1] which use Mono.Security.dll [2] to decode Authenticode signatures, including the timestamps. All the code is available under the MIT X.11 license.

[1] https://github.com/mono/mono/blob/master/mcs/tools/security/chktrust.cs

[2] https://github.com/mono/mono/tree/master/mcs/class/Mono.Security

poupou
  • 43,413
  • 6
  • 77
  • 174