我的.NET exe是使用signtool签名的.使用此代码,我可以验证证书本身的有效性:
var cert = X509Certificate.CreateFromSignedFile("application.exe");
var cert2 = new X509Certificate2(cert.Handle);
bool valid = cert2.Verify();
Run Code Online (Sandbox Code Playgroud)
但是,这仅检查证书本身,而不检查EXE的签名.因此,如果EXE被篡改,则此方法不会检测到它.
如何查看签名?
| 归档时间: |
|
| 查看次数: |
12428 次 |
| 最近记录: |