以编程方式检查数字签名 [英] Checking digital signature programmatically

查看:109
本文介绍了以编程方式检查数字签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在通过数字签名进行签名的项目exe,这意味着当它要求管理员权限时,它会显示公司名称。这样效果很好,但是如果您修改exe,它仍然可以正常工作,并且在那里显示未知。

I have the exe for the project im working on signed by a digital signature which means when it asks for admin rights it shows the company name. This works very well but if you modify the exe it will still work and show unknown there instead.

是否有一种方法可以检查数字签名,以查看其在运行exe时是否有效,从而避免运行修改后的版本?

Is there a way to check the digital signature to see if it is valid when you run the exe to avoid modified versions running?

Visual Studio 2008
Windows 7

Visual studio 2008 windows 7

推荐答案

此处是示例程序(它使用 WinVerifyTrust 函数),以验证签名,但是我不确定它是否可以在Windows 7下运行。您应该尝试一下。

Here is a sample program(it uses WinVerifyTrust function) that verifies signature, but I'm not sure that it will work under Windows 7. You should try it.

这篇关于以编程方式检查数字签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆