开发者

How to retrieve and decode a timestamp date property from authenticode signed files in .NET

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 i开发者_StackOverflow社区t 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜