Signing Open Office 2.0 Macros with a Comodo Code-Signing Certificate.
This document details the process needed to sign Microsoft Office 2000 & XP VBA macros with a Comodo Code-Signing certificate including a worked example. All web links are provided for illustration purposes only, and are correct at time of publishing. It is recommended that the user checks for any updates that may become available since the publishing of this document. Pre-requisites:
* Microsoft's tool to import PVK files:
Download the PVK import tool from Microsoft (pvkimprt.exe)
* Your code signing certificate from Comodo (as PVK and SPC files). Preperation:
Click to obtain your Code Signing Certificate from Comodo
Procedure:
1. Install pvkimport you downloaded from Microsoft. Remember the paths to where you installed it (c:\codesign\). You may also copy your certificate/key files to this directory (mycert.spc & mykey.pvk). 2. Open a command-prompt and change to the folder where you installed pvkimport. (c:\codesign\). 3. Combine your SPC and PVK certificate/key files that you received from Comodo into a PFX file using pvkimport: (c:\codesign> pvkimprt -import –pfx c:\codesign\mycert.spc c:\codesign\mycert.pvk) This will start a wizard. Choose options: Yes, Export the Private Key (check) Include all Certificates in Path if possible (check) Enable strong protection (uncheck) Delete the private key if export is successful (uncheck) Enter a password Choose a location (c:\firefoxext\mycert.pfx) Finish. 4. You can check the private key has been imported successfully by using MMC. Open MMC, select add/remove snap in and select certificates. Opening your code signing certificate should show code signing usage and that you have the private key. 5. Within your Open Office 2.0 document, open the macro editor from the Tools – Macro menu and generate your macro. 6. To sign the document macro, select Digital Signature from the Tools – Macro menu. 7. Select Add to chose to open up Select Certificate window. 8. Select your code-signing certificate and click OK to sign your document macro. 9. Click OK once again. Your document macro is now digitally signed.