代碼簽名 .NET 程序集還是只是設置? (Code sign .NET assemblies or just the setup?)


問題描述

代碼簽名 .NET 程序集還是只是設置? (Code sign .NET assemblies or just the setup?)

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?

‑‑‑‑‑

參考解法

方法 1:

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.

(by DanielRAndrew Hare)

參考文件

  1. Code sign .NET assemblies or just the setup? (CC BY‑SA 3.0/4.0)

#installation #code-signing #.net #deployment






相關問題

Instal versi Firebird yang benar (32bit atau 64bit) dengan Inno Setup (Install correct version of Firebird (32bit or 64bit) with Inno Setup)

在 Ubuntu 中與 EPD python 一起安裝 NLTK (Installing NLTK alongside EPD python in Ubuntu)

INSTAL_PARSE_FAILED_NO_CERTIFICATES - 試圖在 robotsium 上測試不是我的 .apk 文件 (INSTAL_PARSE_FAILED_NO_CERTIFICATES - trying to test not my .apk file on robotium)

直截了當的回答:安裝 py2app (Straight and simple answer: installing py2app)

Sql 2008 排序規則 (Sql 2008 Collation)

Apache Ant Build 命令“拒絕訪問” (Apache Ant Build command "Access Denied")

如何在 C# 部署中包含文件? (How can I include files in a C# deployment?)

使用一個安裝程序安裝多個軟件(安裝包裝器?) (Install multiple softwares with one installer (install wrapper?))

如何獲取 Eclipse 安裝目錄的絕對路徑? (How can I get the absolute path to the Eclipse install directory?)

iPhone,如何使用objective-c為iphone安裝新字體? (Iphone,how to install new font to iphone by using objective-c?)

create-react-app 命令卡在使用 cra-template 安裝 react react-dom react-scripts (create-react-app command stuck on installing react react-dom react-scripts with cra-template)

tensorflow安裝報錯(ERROR:找不到滿足tensorflow要求的版本) (Tensorflow installation error (ERROR: Could not find a version that satisfies the requirement tensorflow))







留言討論