Microsoft Authenticode / Code signing
GDNet+ - Reputation: 1514
Posted 29 March 2012 - 03:52 AM
For work, we are looking at signing our executables so that they can be verified and don't generate warnings for our users. Does anyone have experience with this? Our application is written in C# and uses the .NET 4 Client Profile framework. From what I understand, this code signing technique is called Authenticode..? Is that also the tech used so sign .NET assemblies?
I also understand that I need a certificate for this signing to really mean something. The first provider (CA that is) we found was Verisign.com, which is well known and therefore seemed like a good choice. However, it talks about ActiveX controls and appears to lock the key files to a specific system.. Does anyone know how that works? How do I use it once I have a certificate?
Members - Reputation: 1358
Posted 29 March 2012 - 12:18 PM
Unfortunately I am not too sure how the actual certificate is obtained, or what kind of certificate you should ask them for. But I do know that it can be obtained From Verisign, but that we switched to someone else I can't remember, because it cost less.
I do know things about signatures from a technical perspective, so if you have specific questions, just ask.
I can share one curious thing I have found out that made me scratch my head for a while, before I realized what was going on:
The application was on a machine without connection to the internet. It froze for (i think) 60 seconds when launched. And only when the files were signed...
It turns out that counter-signed (signed with timestamp) .NET-assemblies attempt to validate the signature online when loaded. To avoid this, they can be signed without timestamp. Native DLLs do not exhibit this behaviour, even if signed with timestamp.
Setup files (exe, msi, cab) should be signed with timestamp. They work fine in all current versions of Windows without it, but Windows 8 seems to treat them as "unknown publiher" if they are not signed with timestamp.
Crossbones+ - Reputation: 3773
Posted 29 March 2012 - 01:35 PM
Does anyone know how that works? How do I use it once I have a certificate?
Once you have a cert, you should be able to generate a key for code signing from it. Don't know specifically how that works; should just be an export option.
Signing code can be done in the properties for the project. There's a signing tab, then you just need to specify the strong name key file (.snk). If you're using click once, that uses a different type of cert (.pfx)
Members - Reputation: 1358
Posted 29 March 2012 - 01:58 PM
If you want digital signatures with trust (and from your first post I gather that you do), you need to use a certificate obtained from someone like Verisign and use it with the tool linked in my previous post.
Crossbones+ - Reputation: 3093
Posted 31 March 2012 - 05:42 AM
It sounds like you need a certificate from an authority like Verisign.