代码签名 .NET 程序集还是只是设置?

发布于 2024-07-22 19:15:57 字数 308 浏览 3 评论 0原文

我的公司终于购买了代码签名证书。

我有一个 WinForms 应用程序(1 个 exe 和几个 dll),所有程序集都已使用强名称进行签名。 然后将整个应用程序打包到 msi 安装程序中。 然后我使用 NSIS 将 msi、引导程序和先决条件(框架、SQL CE...)打包到单个 setup.exe 中。

显然我的 setup.exe 需要签名,以避免“可怕的”UAC 提示。 这是否足够,或者您是否还要对其他文件(尤其是 .NET 程序集)进行签名?

属于应用程序的另一个项目是 Windows 服务。 你会签署该集会吗?

My company finally bought a code-signing certificate.

I have a WinForms application (1 exe and several dlls), all assemblies are already signed with a strong name. The entire application is then packaged into a msi installer. Then I use NSIS to pack the msi, the bootstrapper and the prerequisites (Framework, SQL CE...) into a single setup.exe.

Obviously my setup.exe needs to be signed, to avoid the "scary" UAC prompt. Is that enough or would you also sign the other files, especially the .NET assemblies?

Another project that belongs to the application is a Windows serivce. Would you sign that assembly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

饮湿 2024-07-29 19:15:58

你不必这样做,但这不是一个坏主意。

创作经过完全验证的签名安装

您可以使用这些指南来涵盖
整个 Windows 安装程序
通过数字签名安装。

Windows Installer 的作者
安装必须遵守
以下以确保所有部分
安装被覆盖
数字签名:

  • 使用内部 Cabinet 文件,或使用已签名的外部 Cabinet 文件,并且
    正确地创作
    MsiDigitalSignature 表和
    MsiDigitalCertificate 表。
  • 仅使用存储在包中或随程序安装的自定义操作
    包裹。
  • 对安装包进行签名。
  • 在包中包含 MsiPatchCertificate 表。 启用用户帐户
    控制(UAC)修补,此表
    必须包含用于
    识别所使用的签名者证书
    对补丁进行数字签名。 联合应用中心
    修补使作者能够
    安装包识别
    数字签名的补丁可以
    将来应用
    非管理员用户。

上面的说明涵盖了您需要为安装程序本身执行的操作。 签署程序集取决于您,并且在某种程度上是一个单独的问题,并且具有单独的关注点和好处。 请阅读强名称程序集可以让您远离 DLL Hell 了解有关签名程序集的更多信息。

You don't have to but its not a bad idea.

Authoring a Fully Verified Signed Installation

You can use these guidelines to cover
an entire Windows Installer
installation by a digital signature.

Authors of Windows Installer
installations must adhere to the
following to ensure that all parts of
the installation are covered by a
digital signature:

  • Use internal cabinet files, or use signed external cabinet files and
    correctly author the
    MsiDigitalSignature table and
    MsiDigitalCertificate table.
  • Use only custom actions stored within the package or installed with
    the package.
  • Sign the installation package.
  • Include an MsiPatchCertificate table in the package. To enable User Account
    Control (UAC) Patching, this table
    must contain information used to
    identify the signer certificates used
    to digitally sign patches. UAC
    patching enables the author of the
    installation package to identify
    digitally-signed patches that can be
    applied in the future by
    non-administrator users.

The instructions above cover what you need to do for the installer itself. Signing the assemblies is up to you and is somewhat of a separate issue and has separate concerns and benefits. Please read Strong name assemblies can keep you out of DLL Hell for more information about signing assemblies.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文