Signing Open Office 2.0 Macros with a Sectigo Code-Signing Certificate.
This document details the process to sign Microsoft Office 2000 & XP VBA macros with a Sectigo Code-Signing certificate.
All web links are provided for illustration purposes only. It is recommended that the user checks for any updates that may become available since the publishing of this document.
- Microsoft's tool to import PVK files:
Download the PVK import tool from Microsoft (pvkimprt.exe)
- Your code signing certificate from Sectigo (as PVK and SPC files).
- 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).
- Open a command-prompt and change to the folder where you installed pvkimport. (c:\\codesign\\).
- Combine your SPC and PVK certificate/key files that you received from Sectigo 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)
- 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.
- Within your Open Office 2.0 document, open the macro editor from the Tools – Macro menu and generate your macro.
- To sign the document macro, select Digital Signature from the Tools – Macro menu.
- Select Add to chose to open up Select Certificate window.
- Select your code-signing certificate
- Click OK to sign your document macro.
- Click OK once again.
- Your document macro is now digitally signed.