InnoSetup-代码签名证书 [英] InnoSetup - Code Signing Certificate

查看:865
本文介绍了InnoSetup-代码签名证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚从Comodo购买了代码签名证书.我已经建立了一个小型的MS Access数据库,希望通过Inno Setup Installer进行部署.该脚本运行良好,但是我完全不熟悉代码签名.

I have just purchased a code signing certificate from Comodo. I have built a small MS Access database that I want to deploy with Inno Setup Installer. The script runs fine but I am completely new to code signing.

如何签名安装文件?我是否需要外部软件来对证书进行签名,还是可以在Inno Setup中进行?

How can I go about signing my installation file? Do I need an external software to sign the certificate or can I do it from within Inno Setup?

我试图寻找类似问题的答案,但没有一个能够向我展示我需要开始什么以及如何去做.

I have tried to search for answers to similar questions but none was able to show me what I need to get started, and how to go about it.

推荐答案

您所做的很简单,尝试并遵循allong

What you do is quite simple, try and follow allong

  1. 打开Inno设置,然后选择工具"->配置签名工具"
  2. 单击添加.."并为其命名,将其称为MsSign,因为我正在使用
  3. 然后会要求您提供用于签名的工具的命令行,因为我正在使用signtool.exe,我将使用

signtool.exe标志/tr http://timestamp.digicert.com /td sha256/fd sha256/a $ p

signtool.exe sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a $p

请注意最后的 $ p ,Inno Setup需要此... 现在,您应该已经有了它,并请注意,我已经在路径变量中添加了signtool.exe的路径,并且我正在使用DigiCert的时间服务器对我的签名进行时间戳记.

Note the $p at the end, Inno Setup needs this... You should now have this, and note that I have added the path to signtool.exe in my path variables and that I am using DigiCert's time server to time-stamp my signature.

  1. 现在,在脚本中,将以下代码添加到设置段中

  1. In the script, you now add the following code to the setup segment

SignTool = MsSign $ f

SignTool=MsSign $f

此行告诉编译器使用代码签名,它将使用我称为MsSign的变量,并将对安装程序生成的输出进行签名.

this line, tells the compiler to use code signing, it will use the variable I've called MsSign, and will sign the output generated by the setup.

它应该看起来像这样

it should look like this

当您查看生成的EXE时,您将看到数字签名

When you look at the generated EXE you will see the digital signature

现在这对我有用,因为我已经以如下方式准备了我的签名存储区:命令行可以获取签名,并且我只有一个代码签名签名,因此我将不需要命名它,因为您的参数可能与是的,只要最后就可以了,您的设置可以正常工作并且您的代码得到签名.

Now this works for me because I have prepared my signature store in such a way that the command line can get the signature and I have only one code sign signature so I will not need to name it, your parameters may be different than mine are, and that's okay as long as in the end, your setup works and your code gets signed.

希望能有所帮助,并记住您需要变量中的 $ p

Hope to have helped and remember you need that $p in the variable

这篇关于InnoSetup-代码签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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