Wednesday, November 7, 2012

Click Once certificates stopped working after a Windows Update

At a customer we are using Click Once to deploy our Windows Client Applications. These applications are signed by a certificate to improve security and differentiate between the available environments(we’ve created a different certificate for each environment).

This all worked fine for years until 2 weeks ago. Developers started to complain that they could no longer publish their application using these certificates. They got the following error in Visual Studio:

Error     4          An error occurred while signing: Failed to sign bin\x86\Acceptatie\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\x86\Acceptatie\app.publish\\setup.exe   AppName

The certificates were still valid, their were not revoked or expired, the root certificate was available and trusted… To make it even stranger, the problem didn’t occur on all systems. On my system everything still worked normally. Until a few days later, I got the same problem?!

What changed on  my system that could have caused this issue? We noticed that the problems started to occur after installing a specific Windows Update.

This piece of information brought us to the following blog post(rsa keys under 1024 are blocked) containing this:

To further reduce the risk of unauthorized exposure of sensitive information, Microsoft has created a software update that will be released in August 2012 for the following operating systems: Windows XP, Windows Server 2003, Windows Server 2003 R2, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2. This update will block the use of cryptographic keys that are less than 1024 bits.
Some issues that you may encounter after applying this update may include:

  • Error messages when browsing to web sites that have SSL certificates with keys that are less than 1024 bits
  • Problems enrolling for certificates when a certificate request attempts to utilize a key that is less than 1024 bits
  • Creating or consuming email (S/MIME) messages that utilize less than 1024 bit keys for signatures or encryption
  • Installing Active X controls that were signed with less than 1024 bit signatures
  • Installing applications that were signed with less than 1024 bit signatures (unless they were signed prior to January 1, 2010, which will not be blocked by default).

To prepare for this update, you should determine whether your organization is currently using keys less than 1024 bits. If it is, then you should take steps to update your cryptographic settings such that keys under 1024 bits are not in use.

We had a second look at the certificates we were using and we noticed that although the certificate itself was using a 1024bit key, the root certificate we used to create these certificates was only 512bit. This made the whole certificate chain invalid.

If only we had noticed this article sooner…

No comments: