问题描述
使用makecert / pvk2pfx创建的我的未过期证书突然间在尝试发布ClickOnce应用程序时抛出错误。就在上周,这很好用...
All of a sudden my unexpired certificate created using makecert/pvk2pfx is throwing an error when attempting to publish a ClickOnce application. This worked fine just last week...
错误消息:
当我使用签名选项卡中的创建测试证书选项时,该证书可以正常工作,并且该应用程序已成功发布。
When I use the "Create Test Certificate" option in the Signing tab that certificate works fine and the application is published successfully.
使用makecert /手动创建证书时pvk2pfx我正在遵循。
When manually creating my certificate with makecert/pvk2pfx I'm following the MSDN instructions.
当我删除旧的手动创建的证书时,使用makecert / pvk2pfx创建一个新证书并尝试使用该证书,我会得到相同的错误。
When I delete my old manually created certificate, create a new one using makecert/pvk2pfx and try to use that one I get the same error.
该应用程序是针对.NET 4的WPF应用程序,而这一切都在Visual Studio 2010中...
The application is a WPF application targeting .NET 4, and this is all in Visual Studio 2010...
有什么想法吗?
推荐答案
在我指定证书长度大于1024之后,它对我有用:
It worked for me after I specified the certificate length greater than 1024:
makecert -sv MyApp.pvk -n "CN=MyCompany" -len 2048 MyApp.cer -r
pvk2pfx -pvk MyApp.pvk -spc MyApp.cer -pfx MyApp.pfx -po MyPassword
Microsoft发布了一个更新,该更新会影响所有RSA密钥长度小于1024位的证书。
Microsoft released an update that affects all certificates having an RSA key less than 1024 bits long.
这篇关于使用makecert / pvk2pfx时,ClickOnce签名者的证书对签名无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!