如何从 PFX 文件发布证书

发布于 2024-09-15 02:45:00 字数 508 浏览 4 评论 0原文

我正在尝试使用 VSTO 应用程序发布。 wikipedia.org/wiki/ClickOnce" rel="nofollow noreferrer">ClickOnce 并生成了一个“临时密钥”(PFX 文件)来签署 ClickOnce 清单。目标计算机不接受此证书,因此无法安装我的应用程序。

更准确地说,如果 ClickOnce 服务器位于 Windows“Internet 设置”中的“Intranet”区域内,则可以安装该应用程序,但每次安装新版本时都会警告用户并提示用户接受证书。

我想在目标计算机上安装证书作为受信任的证书。

Visual Studio 为证书生成的唯一文件是 PFX 文件。该文件似乎包含私钥,因此我不想发布它。 如何从该 PFX 文件中提取公共证书,以便将其作为可信证书安装?

I am trying to publish a VSTO application using ClickOnce and have generated a "temporary key" (a PFX file) to sign the ClickOnce manifest. This certificate is not accepted on the target computer and thus my application cannot be installed.

More precisely, if the ClickOnce server is within the "Intranet" zone in the Windows "Internet Settings", installation of the application is possible but the user is warned and prompted to accept the certificate every time a new version is to be installed.

I would like to install the certificate on the target machine as a trusted certificate.

The only file Visual Studio generated for the certificate was a PFX file. This file seems to include the private key so I do not want to publish it. How can I extract a public certificate from that PFX file such that it can be installed as a trusted certificate?

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

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

发布评论

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

评论(1

荭秂 2024-09-22 02:45:00

您的应用程序是 VSTO 应用程序吗? AFAIK,VSTO 确实需要有效的证书,或者该证书安装在用户的计算机上并且具有受信任的发布者。但非 VSTO ClickOnce 不会,除非机器上发生了某些变化?它应该给出安全提示,但用户无论如何都应该能够安装该应用程序。你的不也是这样工作的吗?

在 Visual Studio 中创建的证书有效期为一年。

要获得受信任的证书,您可以购买一个(我听说 Go Daddy 提供的证书价格非常低99 美元)。如果您在企业环境中工作,企业 IT 人员可以创建一个链接到受信任发布者的代码签名证书。

对于 PFX 文件,您可以双击它以将其添加到用户的注册表中。

Is your application a VSTO application? AFAIK, VSTO does require a valid certificate, or that the certificate be installed on the user's machine and has a trusted publisher. But non-VSTO ClickOnce does not, unless there's been something changed on the machine? It should give the security prompt, but the user should be able to install the application anyway. Does yours not work this way?

The certificate created in Visual Studio is good for a year.

To get a trusted certificate, you can purchase one (I hear Go Daddy provides them for as little as US$99). If you work in a corporate environment, the corporate IT guys can create a code signing certificate that chains back to a trusted publisher.

For a PFX file, you can double-click on it to add it to the user's registry.

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