Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ClickOnce Publish Signtool Error

First I'd like to say:

  • My certificate is not expired (it expires in 12/31/2039)
  • My certificate has not changed
  • I don't want to use a new certificate because it will require me to reinstall my application on all client machines.

Suddenly when I try to publish my WCF/WPF solution I get:

Error 2 An error occurred while signing: Failed to sign bin\Debug\app.publish\setup.exe. SignTool Error: The signer's certificate is not valid for signing. SignTool Error: An error occurred while attempting to sign: bin\Debug\app.publish\setup.exe

Has anyone else experience this with a certificate that by all means should be valid? Any suggestions on what might be the problem?

like image 460
Brent Lamborn Avatar asked Oct 15 '12 15:10

Brent Lamborn


1 Answers

As indicated, in the case of Windows 7 KB2661254 (code key length < 1024) is the culprit but if you are running Windows 8 you cannot uninstall the KB and you need to discover the keys with length < 1024 and fix them.

See the KB article

http://support.microsoft.com/kb/2661254

UPDATE: It turns out that it was the root certificate for the self signed cert that was 512 bits, not the actual certificate itself. I regenerated on Windows 8 and all was fine with the new cert.

like image 152
Kevin Avatar answered Nov 11 '22 04:11

Kevin