TruePersona are authorised resellers of DigiCert, Thawte, GlobalSign, GeoTrust and Rapid SSL products
Main Menu
Key Concepts
SSL Resources
| How to Sign Code |
|
|
|
| Written by Chris Stone | |||||||||||||
| Wednesday, 11 October 2006 22:13 | |||||||||||||
How to SignWhen you sign your file you actually add a small packet of information (1-4 KB) to the end of the file. When the browser downloads the file it reads this packet and contacts a CA (Certificate Authority) like verisign.com, tawthe.com and others... to verify with them the authenticity of the file. Getting startedHow to get started with code signing? The current set of tools were released with the introduction of Microsoft Visual Studio 2005. The tools are provided as part of the Visual Studio 2005 and in the Platform SDK. To download the Platform SDK, visit the following Microsoft Web site: http://msdn.microsoft.com After you install the SDK you will have the code signing files on your PC: The following files are of interest to us:
All the above tools are actually small console programs that should be run from a command prompt. When run, each program expects command-line parameters in a special syntax. Public CertificateWhere to get a Public Certificate? To be able to sign your code you will need a certificate. Certificates are issued by Certificate Authorities (CA). There are many Certificate Authorities, you can get a full list of CAs by going to: Microsoft Root Certificate Program Members . TruePersona™ can supply code signing certificates recognised by the major CA's. Acquiring a certificate from TruePersona™ is an easy and straight forward process. You provide sufficient information to enable TruePersona™ to identify you or your organization and then a certificate is issued. If you do not want to go to the expense of buying a public certificate, you can begin with a test certificate. The test certificate can be used to sign your program in a test run. A program signed with a test certificate should not be distributed on the net. Test CertificateHow to create a Test Certificate? The following command line may be used to create a Test Certificate (CER) file:
At the end of this process you will have the following 2 files:
When running - "makecert.exe" will present the following dialog: You should enter a password to protect your "Private Key". Create Software Publishing CertificateHow to create a Software Publishing Certificate? The "Software Publishing Certificate" (*.SPC file) is created from the "Public Key" file (*.CER) you created in the previous step. The following command is used to create the "Software Publishing Certificate" (SPC) file:
At the end of this process you will have one new file:
When running - "cert2spc.exe" will present the following dialog: Enter here the same password you used when creating the "Test Certificate" or the "Public Certificate". Purchase Software Publishing CertificateHow to purchase a Software Publishing Certificate? You can purchase a certificate from TruePersona. TruePersona can create the certificate for you or you can create your own through the website link provided by us. When you click the [Buy] button, you will go through a process that includes the following steps:
During the creation of the Private Key file you will be prompted for a password. You should remember this password so that you can use it later when you sign your application. You must also copy the Private Key file to a safe place. When creating the Private Key file on your computer, the applet will also create the corrsponding "Public Key" file. It is then necessary to verify and approve your organization and domain. This process usually take few days. During this time you may be approached by telephone or other means and requested for means of identification. When the verification process is concluded you will receive a link to a Certificate File (*.SPC). Download this file and do the following:
Personal Information ExchangeHow to create a Personal Information Exchange file? The following command line may be used to create a "Personal Information Exchange" (PFX) file:
At the end of this process you will have one new file:
Pass1: - Provide the same password you used when creating the Private & Public keys. Pass2: - Provide a new password to protect the PFX file. * For security reasons it is recommended that Pass2 will be different then Pass1. Sign Your CodeHow to sign your code? You can use signtool.exe to sign your code. The following commands may be used to sign your code.
At the end of this process the program file "true.exe" in this example will be signed. As can be seen, this command expects the following parameters:
Verify your Digital SignatureHow to verify your digital signature? This can be accomplished using signtool.exe.The following commands may be used to verify your digital signature.
As can be seen, this command expects only one parameter the name of the file under test. Verify using Properties You can also use the following method to verify your digital signature:
Explorer will present you with the properties dialog of the file. Further InformationUse the following links to learn more about Code Signing and Authenticode |
|||||||||||||
| Last Updated on Monday, 22 December 2008 23:12 |




