A client I am working with has asked me about importing digital signatures into executables and my first reaction was, gross. So the developer showed me exactly what the issue was and really what they were trying to avoid was a nasty IE message to their end users and provide them with a friendlier message.
Here are the steps it took to accomplish this task.
1. Create a new code signing template from the internal Microsoft CA
a. Logon to CA Issuer server
b. Open MMC and add Certificate Templates
c. Find the template Code Signing, right click it and select Duplicate Template
d. Name the template, check Publish certificate in Active Directory, in Subject Name tab select Supply in the request and in the Security tab, verify the user who will be requesting the certificate has Enroll allow rights.
2. Issue the template to the CA
a. From the CA Issuer server, open Certificate Authority and click on Certificate Templates.
b. Right Click Certificate Templates and New ā Certificate Template to Issue
c. Select the template you created in step 1 and click OK.
3. Request a certificate using the template created in Step 1
a. From a domain server, go to http://<CA Issuer Server>/certsrv
b. Click Request a certificate
c. Click Create and submit a request to this CA
d. Select the template created in Step 1, fill in the necessary Indentifying Information, check Mark keys as exportable, give a Friendly Name and click Submit.
e. Click Install Certificate
4. Export the certificate to a .pfx
a. Open MMC and add Certificates
b. Find the certificate with the personal container.
c. Right click on the certificate and select Export which will start the Export wizard
d. Click Next
e. Select Yes, export the private key and click Next
f. Verify Personal Information Exchange ā PKCS #12(.PFX) and Enable strong protection is checked, click Next
g. Set a password, click Next
h. Determine the file location and click Next
i. Click Finish
5. Have the developer import the cert into the executable using signtool
a. Give the developer the .pfx file and have them use signtool to import the certificate into the executable
Here is a link that explains how to import the cert into an executable.
http://blog.didierstevens.com/2008/12/31/howto-add-a-digital-signature-to-executables/
