使用.pfx证书签署程序集

编程入门 行业动态 更新时间:2024-10-25 23:37:24
本文介绍了使用.pfx证书签署程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好。

最近我从Comodo获得了证书。 我可以使用signtool.exe轻松签署我的可执行文件和msi文件任何问题。 现在问题是:我需要在每个Visual Studio项目中签署我的程序集。 (WinXP上的Visual Studio 2010) 当我转到项目>属性>签名时,我标记"签署组合"并选择了我的certificate.pfx文件。 当我输入密码时,我收到此错误: $ "找不到用于解密的证书和私钥"。 所以我用CertMgr.msc干净地导出了我的certificate.pfx文件,其中包括以下内容: 1)是,导出私钥<所有个人信息交换支票都没有.b 然后我用这个新的.pfx文件重新进行了Visual Studio签名操作。 但是这次,当我输入密码时,我收到了这个错误: $ "无法导入以下密钥文件:MyCert.pfx。密钥文件可能受密码保护。 要更正此问题,请尝试再次导入证书,或使用以下密钥容器名称手动将证书安装到 强名称CSP :VS_KEY_xxxxxxx" "导入密钥文件"MyCert.pfx""被取消了。"因为我试图手动使用sn工具(sn -i MyCert.pfx VS_KEY_xxxxxxx),但我只有另外一个错误: "无法安装密钥对 - 对象已存在"&b 后来再次执行此过程,我又出现了另一个错误。 b $ b"试图引用不存在的令牌"

Recently I got my certificate from Comodo. I can easily sign my executables and msi files with signtool.exe without any problem. Now the problem: I need to sign my assemblies in each Visual Studio projects. (Visual Studio 2010 on WinXP) When I go to Project>Properties>Signing, I flag "Sign the assemly" and chose my certificate.pfx file. When I insert the password, I got this error: "Cannot find certificate and private key for decryption". So I made a clean export of my certificate.pfx file with CertMgr.msc thith the following: 1) yes, export the private key 2) none of all personal information exchange checks. Then I re-made the Visual Studio signing operations with this new .pfx file. But this time, when I insert the password, I got this error: "Cannot import the following key file: MyCert.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_xxxxxxx" "Importing key file "MyCert.pfx" was canceled." So I tried to manually the sn tool (sn -i MyCert.pfx VS_KEY_xxxxxxx), but I only got another error: "Failed to install key pair -- Object already exists" And later, doing again the procedure, I got another error "An attempt was made to reference a token that does not exist"

我没有想法......请给我一些帮助。谢谢

I'm out of ideas... please give me some help. Thanks

推荐答案

"无法找到用于解密的证书和私钥"。

"Cannot find certificate and private key for decryption".

您好DevRex,

此问题主要发生在 .pfx文件不能包含证书链信息。

我不知道你是怎么创建的.pfx文件。我建议您使用Visual Studio创建的新密钥文件对程序集进行签名,请参阅 msdn.microsoft/en-us/library/ms247123(v = vs.110).aspx

I'm not sure how did you create the .pfx file. I suggest you tosign the assembly using a new key file created by Visual Studio, seemsdn.microsoft/en-us/library/ms247123(v=vs.110).aspx

B est问候,

更多推荐

使用.pfx证书签署程序集

本文发布于:2023-05-29 23:05:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/355024.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:证书   程序   pfx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!