How to dual sign a binary with Authenticode?

前端 未结 2 1548
再見小時候
再見小時候 2020-12-09 21:44

Short question

How can I get information about multiple code signing certificates from an executable (.EXE/.DLL)?

Expected answer

2条回答
  •  -上瘾入骨i
    2020-12-09 22:32

    Give Mono a try. It's able to pull all of the file's Authenticode certificates in one line!

        using Mono.Security.Authenticode;
    
        AuthenticodeDeformatter monoFileCert = new AuthenticodeDeformatter("System.Windows.dll");
        Console.WriteLine($"Found certificates {monoFileCert.Certificates.Count}");
    

    https://github.com/mono/mono/blob/master/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs

    Usage example: https://github.com/mono/mono/blob/master/mcs/tools/security/chktrust.cs

提交回复
热议问题