How to: Combine PVK + SPC to PFX

May 25, 2018 in Windows and Code Signing

Prerequisites

  • Microsoft's tool to import PVK files (For Windows 2000/XP Only!)
  • Your code signing certificate from Sectigo (as PVK and SPC files).


Install pvkimport you downloaded from Microsoft.

  • Note: Remember the paths to where you installed it (c:\\codesign\\)
  • Copy your certificate/key (mycert.spc & mykey.pvk) files to the directory where you installed 'pvkimport'
  • 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:\\codesign\\mycert.pfx)
  • Finish.

You can check the private key has been imported successfully by using MMC.

  • Open MMC
  • Select add/remove snap in and select certificates. (Computer Account, Local Computer)
  • Opening your code signing certificate should show code signing usage and that you have the private key.