Skip to main content

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…

Popular posts from this blog

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Color B

Help! I accidently enabled HSTS–on localhost

I ran into an issue after accidently enabling HSTS for a website on localhost. This was not an issue for the original website that was running in IIS and had a certificate configured. But when I tried to run an Angular app a little bit later on http://localhost:4200 the browser redirected me immediately to https://localhost . Whoops! That was not what I wanted in this case. To fix it, you need to go the network settings of your browser, there are available at: chrome://net-internals/#hsts edge://net-internals/#hsts brave://net-internals/#hsts Enter ‘localhost’ in the domain textbox under the Delete domain security policies section and hit Delete . That should do the trick…

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.