I have created a DLL that I am exposing via COM that I need to sign with a certificate.
I have created a Visual Studio 2008 project and it has a class library which
Microsoft has a decent whitepaper/tutorial on how to go about doing this:
MSDN Article
Here is the long and short of it: To sign your code
Apply for a certificate from a certificate authority. See http://msdn.microsoft.com/workshop/security/authcode/certs.asp for instructions on obtaining a certificate.
Get the latest tools for signing files and checking signatures. See http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/crypto/cryptotools_4739.htm.
Prepare your files to be signed. If you are signing any .exe, .ocx, .vbd or .dll file, you do not need to do anything special. If you are signing a .cab file, you must add the following entry to your .ddf file and remake your .cab file:
.Set ReservePerCabinetSize=6144
Sign your files using signcode.exe. The following is an example of how you might sign a file:
Signcode -prog myfilename -name displayname -info http://www.mycompany-inc-10.com - spc mycredentials.spc -pvk myprivatekey.pvk
Test your signature: