Get timestamp from Authenticode Signed files in .NET

前端 未结 7 1003
广开言路
广开言路 2020-11-30 04:53

We need to verify that binary files are signed properly with digital signature (Authenticode). This can be achieved with signtool.exe pretty easily. However, we need an auto

相关标签:
7条回答
  • 2020-11-30 05:41

    The provided answers didn't worked in my case for SHA256 signing method. I newer reached the bottom within those nested foreach loops. But Nuget AuthenticodeExaminer seams to works just fine. Here is example for single certificate with single timestamp:

            var extractor = new FileInspector(@"D:\Temp\file.exe");
            var signTime = extractor.GetSignatures().FirstOrDefault()?.TimestampSignatures.FirstOrDefault()?.TimestampDateTime?.UtcDateTime;
    
    0 讨论(0)
提交回复
热议问题