是否可以使用 SSL 证书对我的程序集进行签名?

发布于 2024-10-27 01:34:14 字数 82 浏览 0 评论 0原文

试图一石二鸟。我不太熟悉证书及其工作原理等。如果我的公司网站有 SSL 证书,我可以用它来签署我的程序集并让它们受到信任吗?我想不会,但认为值得一问。

Trying to kill two birds with one stone. I'm not well versed in certificates, how they work, etc. If I have an SSL certificate for my corporate web site can I use it to sign my assemblies and have them be trusted? I assume not but thought it was worth asking.

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

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

发布评论

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

评论(2

我的鱼塘能养鲲 2024-11-03 01:34:14

您可以使用拥有私钥的适当代码签名证书对程序集(以及任何 Windows dll 或 exe)进行签名。

除非非常不寻常,否则网站(身份验证)证书将不具有正确的“使用”属性以允许其用于代码签名。

有关此内容的更多信息(以及进行签名所需的工具):有关 Authenticode 代码签名所需了解的所有内容

You can sign assemblies (and any Windows dll or exe) with an appropriate code signing certificate where you have the private key.

Unless it is very unusual a web site (authentication) certificate will not have the correct "usage" property to allow it to be used for code signing.

For more on this (and the tools you need to do the signing): Everything you need to know about Authenticode Code Signing .

橘寄 2024-11-03 01:34:14

除了 Richard 所说的之外,您还需要区分强命名(使用“原始”私钥对程序集进行签名)和 Authenticode 签名。强命名特定于 .NET 程序集,Authenticode 用于签署任何 PE 文件(以及一些其他文件类型)。

此外,如果您使用 Authenticode 对程序集进行签名,请准备好在加载程序集时出现延迟。这是因为 .NET Framework 会验证签名并选择性地检索 CRL 并在每次加载程序集时执行 OCSP 检查。因此,除非您必须签署程序集,出于性能原因,您可能希望跳过此步骤。

在我们的 Secureblackbox 产品中,我们对所有程序集进行了签名,但随后一些客户报告说程序集根本无法加载,结果证明这与签名验证有关。因此,我们删除了authenticode签名并仅保留.NET强命名。

In addition to what Richard said, you need to distinguish between strong-naming (signing an assembly with a "raw" private key) and Authenticode signing. Strong-naming is specific to .NET assemblies, and Authenticode is used for signing any PE file (and some other file types as well).

Also if you sign the assembly using Authenticode, be ready to get delays when the assembly is loaded. This is because .NET Framework validates the signature and optionally retrieves CRLs and performs OCSP checks each time the assembly is loaded. So unless you must sign the assembly, for performance reason you might want to skip this step.

In our Secureblackbox product we had all assemblies signed, but then some customers reported that the assemblies simply won't load, and this turned out to be related to signature validation. So we removed authenticode signatures and kept only .NET strongnaming.

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