c# - 代码签名应该放在构建/发布过程中的什么位置?

标签 c# visual-studio-2010 build-process code-signing post-build-event

我最近才开始享受能够签署可执行文件的乐趣。现在,我正在尝试在构建/发布过程中建立一个应该对程序集进行签名的适当位置。

我的第一直觉是尽早签名(在构建后事件中),以确保所签名的内容符合构建者的预期。

但这(在我们的例子中)要求每个开发人员都拥有对私钥的完全访问权限,这可能是不可取的。

另一个想法是仅在我们发布时才进行签名,这样签名就很少由少数人执行。但这是否太晚了

是否存在最佳实践?

最佳答案

Delay Signing an Assembly :

An organization can have a closely guarded key pair that developers do not have access to on a daily basis. The public key is often available, but access to the private key is restricted to only a few individuals. When developing assemblies with strong names, each assembly that references the strong-named target assembly contains the token of the public key used to give the target assembly a strong name. This requires that the public key be available during the development process.

You can use delayed or partial signing at build time to reserve space in the portable executable (PE) file for the strong name signature, but defer the actual signing until some later stage (typically just before shipping the assembly).

关于c# - 代码签名应该放在构建/发布过程中的什么位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10457752/

相关文章:

c# - 无法同时路由到 "{controller}/{action}/{id}"和 "{controller}/{id}"

c# - 如何使用 ADAL/OpenId 获取 azure AAD 中的当前用户?

visual-studio-2010 - 在 Windows 7 64 位上编译 OpenCV

java - 创建由 Maven 项目构建的 Artifact 列表

c - 构建文件(Rake 或 Make?)用于构建一些具有通用选项的简单库?

c# - 使用 ASP.NET Core 1.1 (MVC) 访问类库中的 httpcontext

c# - 尝试显示 ContextMenu 并单击其父项时发生 StackOverflowException

用于导入类的 Visual Studio Ctrl-Dot 的 Eclipse 等效项

visual-studio-2010 - VS2010 : New and improved Intellisense?

c++ - 在 VS 中构建由 Boost 驱动的解决方案