【问题标题】:Where do you download signcode.exe and other tools你在哪里下载signcode.exe和其他工具
【发布时间】:2009-09-20 20:42:30
【问题描述】:

如果您决定签署您的代码,您需要:

  • signcode.exe
  • makecert.exe
  • cert2spc.exe
  • pvk2pfx.exe

下载这些工具的最佳位置是什么?

有没有办法在不下载大量 Microsoft Windows SDK 的情况下做到这一点?

【问题讨论】:

  • 添加了“无需下载大部分 Microsoft Windows SDK”
  • 请参阅我的更新答案以进行澄清。

标签: code-signing makecert


【解决方案1】:

Windows SDK 开头。这应该包含您要查找的大部分内容。

此外,SignCode.exe 在 .NET 1.1 之后已被弃用。 SignTool.exe 是替代品。


不下载 SDK?

一般来说,只有少数 SDK 工具可以在 Microsoft 官方软件包之外再分发。它们列在redist.txt 文件中。在我的系统上,我在%ProgramFiles%\Microsoft.NET\SDK\v2.0 64bit 中找到了一个.NET SDK redist.txt 文件(我假设该文件夹在x86 系统上称为“v2.0”)。它是这样说的:

.NET 框架 SDK 文件 根据软件的许可条款, 以下 .EXE 文件可能未经修改即可分发: 魔术师UI.exe 魔法师.exe Makecert.exe

因此,这些文件中的大多数似乎都无法再分发。再说一次,我的回答是下载 Windows SDK。 请记住,如果您愿意,您可以只安装工具的一个子集;安装程序允许您选择/取消选择任何组件(例如,仅 .NET 开发工具)。

【讨论】:

  • 好建议。作为更新,SignTool.exe 现在似乎位于最新版本 SDK 的 %ProgramFiles%\Microsoft SDKs\Windows\v7.1\ 和 %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\ 中。
  • "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /f cert.pfx /p password target.dll
  • "SignCode.exe 在 .NET 1.1 之后已被弃用" — 我不明白这部分。我在 Delphi 中开发,然后升级到 Ada。如果 .NET 从未为我启动,我应该如何解释“在 .NET 1.1 之后不推荐使用”?
【解决方案2】:

我刚刚安装了适用于 Windows 8 的 Windows SDK。但我仍然找不到 SignTool.exeSignCode.exe

直到我意识到微软改变了它的安装路径。现在它已安装到以下位置之一:

  • 64 位,版本 8.1:C:\Program Files (x86)\Windows Kits\8.1\bin\x64
  • 32 位,版本 8.1:C:\Program Files (x86)\Windows Kits\8.1\bin\x86
  • 64 位,版本 8.0:C:\Program Files (x86)\Windows Kits\8.0\bin\x64
  • 32 位,版本 8.0:C:\Program Files (x86)\Windows Kits\8.0\bin\x86

EDIT 在 Windows 10 上,可以在以下位置找到二进制文件:

  • C:\Program Files (x86)\Windows Kits\10\bin\x86

【讨论】:

  • 您使用哪个链接安装 SignTool.exe?"我根本找不到。
【解决方案3】:

我相信前三个是.NET Framework SDK 的一部分,而最后一个是Windows Driver Kit 的一部分。

我找不到将 pvk2pfx.exe 列为 Platform SDK(现在显然是 Windows SDK)一部分的文档,但我最初认为它来自那里。

【讨论】:

    【解决方案4】:

    我尝试了下面的方法,它成功了,虽然它没有得到你 SignCode.exe(它已被弃用并被 SignTool.exe 取代)

    您可以通过安装 just Visual Studio 安装中的 C++ Windows 开发工具来获取 SignTool.exe(我的是古老的:2005)。更多详情@@Lindersoft.com

    如何将 PFX/P12 文件转换为 SPC/PVK 格式

    使用私钥导出证书。

    使用带有以下选项的导出向导:

    Export Private Key (Yes)
    
    DO NOT TICK include all certificates in the certification path if possible
    
    TICK enable strong protection
    
    DO NOT TICK delete private key
    

    先决条件:OpenSSL 0.9.8 或更高版本。首选 OpenSSL 1.x。

    注意:如果您运行的是 Windows,您可以在此处下载 OpenSSL。否则,您可以直接从 OpenSSL 网站找到已编译的二进制文件,或查阅您的操作系统的包管理功能。

    私钥 (PVK)

    Extract your Private Key from the PFX/P12 file to PEM format.
         openssl pkcs12 -in PFX_FILE -nocerts -nodes -out PEM_KEY_FILE
    
    Note: The PFX/P12 password will be asked. This is the password you gave the file upon exporting it.
    
    Convert PEM Private Key to PVK format.
    
    OpenSSL 0.9.8 series:
         pvk -in PEM_KEY_FILE -topvk -out PVK_FILE
    
    OpenSSL 1.x series:
         openssl rsa -in PEM_KEY_FILE -outform PVK -pvk-strong -out PVK_FILE
    
    Note #1: In order to use pvk for OpenSSL 0.9.8 series, you must download PVK Transform.
    
    Note #2: A PEM passphrase may be asked. This will be the password/passphrase that you will use to sign your code.
    

    软件发行商证书 (SPC)

    Extract Certificate from P12/PFX file.
         openssl pkcs12 -in PFX_FILE -nokeys -out CERT_PEM_FILE
    
    Convert Certificate to SPC format.
         openssl crl2pkcs7 -nocrl -certfile CERT_PEM_FILE -outform DER -out SPC_FILE
    

    注意:如果您从 IE 之外的其他浏览器导出证书,请确保在 CERT_PEM_FILE 中只有您的证书存在,否则代码签名将不起作用!

    转换示例

    PVK openssl pkcs12 -in my_pfx_file.pfx -nocerts -nodes -out rsa.pem openssl rsa -in rsa.pem -outform PVK -pvk-strong -out mykey.pvk

    SPC openssl pkcs12 -in my_pfx_file.pfx -nokeys -nodes -out cert.pem openssl crl2pkcs7 -nocrl -certfile cert.pem -outform DER -out cert.spc

    此信息由Komodo提供。

    【讨论】:

      【解决方案5】:

      第 1 步:下载:

      http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/winsdk_web.exe

      http://www.microsoft.com/en-us/download/details.aspx?id=8279

      第二步:

      C:\Users\user1>"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signto
      ol.exe"
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-06-14
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多