如何使用我的代码签名证书签署exe和dll [英] How do I sign exes and dlls with my code signing certificate
问题描述
((我从Thawte购买了代码签名证书,并且在整个过程中沮丧不已。
我从他们那里得到的是:
- .spc / .p7b文件
- .pvk文件
(注意,我没有他们的pfx文件。上帝知道原因,但是我一直在与他们的技术支持进行斗争一周)
无论如何,我都在他们的网站和MS上找到了signcode.exe的帮助链接,这对我来说是无用的,因为我在机器上找不到该exe,但是我确实拥有signtool。 exe。
不幸的是,我对命令行参数感到迷惑 具体来说,我使用什么参数和什么值?它完全不起作用。 我可以使签名向导正常工作,但是我需要它来不交互地工作可以在hudson CI批处理文件中找到。 看上去似乎并不那么困难,但到目前为止,这全都是黑魔法。 感谢您的帮助 首先,您可以使用 http://msdn.microsoft.com/en-us/library/ff549703 (VS.85).aspx 类似 第二,signtool是您所追求的工具。 http://msdn.microsoft.com/en-us /library/aa387764(VS.85).aspx 获得帮助,但是您可能要遵循的基本命令是 将签署target.exe。如果要将证书放入计算机上的证书存储中,这将变得更加复杂(这是CSP位)。这对于在许多开发机上或要在其上避免将证书置于源代码控制中的构建实验室计算机上进行签名的情况下确实很有用。 (I purchased a code signing cert from Thawte and have been going out of my mind with frustration at the whole process. What I have from them are: (NOTE I do not have a pfx file from them. God knows why, but I have been fighting with their tech support for a week) In any case I find "help" links on their site and at MS for signcode.exe which is useless for me because I can't find that exe on my machine, however I do have signtool.exe. Unfortunately i am mystified at the command line parameters listed on this MS help site. Specifically, what parameters do I use and what values? I tried what I thought was obvious but it does not work at all. I can get the signing wizard to work, however I need this to work non-interactively in a hudson CI batch file. It really doesn't seem like it should be this difficult, but so far it is all black magic. thanks for any help First, you can generate your own pfx file using the pvk2pfx tool described at http://msdn.microsoft.com/en-us/library/ff549703(VS.85).aspx Something like ought to do the trick. Secondly, signtool is the tool you're after. http://msdn.microsoft.com/en-us/library/aa387764(VS.85).aspx Gets you the help, but the basic command you're probably after is Which will sign target.exe. It gets more complex if you want to put the certificate into the certificate store on the machine (this is the CSP bit). This is really useful though for doing signing on a lot of dev machines, or on build lab machines where you want to avoid putting the certificate in source control. 这篇关于如何使用我的代码签名证书签署exe和dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
pvk2pfx -pvk cert.pvk -spc cert.spc -pfx cert.pfx -pi密码
signtool sign /?
signtool签名/ f cert.pfx / p密码target.exe
pvk2pfx -pvk cert.pvk -spc cert.spc -pfx cert.pfx -pi password
signtool sign /?
signtool sign /f cert.pfx /p password target.exe