To Create A Personal Information Exchange (PFX) File

After a digital certificate is made with the MakeCert.exe tool, a Personal Information Exchange (PFX) file must be created before a binary file can be signed. You use the Pvk2Pfx (Pvk2Pfx.exe) tool to create a PFX file which is a single file that contains both the Private Key (PVK) and Certificate (CER) files that were exported from the MakeCert.exe tool. A Software Publisher Certificate (SPC) file can also be used instead of a CER file.

The Pvk2Pfx (Pvk2Pfx.exe) tool is part of the Windows SDK. You can learn more about the Pvk2Pfx.exe tool from Microsoft's website (https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/pvk2pfx).

The following is an example of creating a PFX file with the Pvk2Pfx.exe tool from the PVK and CER files that are created from the example in the "To Make a Digital Certificate" topic:

"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\pvk2pfx.exe" -pvk MyCert.pvk -pi MyPassword -spc MyCert.cer -pfx MyCert.pfx -po MyPassword

To create the PFX file, do the following:

  1. Make a private key and digital certificate, or use the PVK and CER existing files that were previously made with the MakeCert.exe tool. See the "To Make a Digital Certificate" topic for a basic understanding of how to use the MakeCert.exe tool.
  2. Click the Windows Start button Windows System Command Prompt to display the Windows Command prompt.
  3. In the Windows Command Prompt window, type cd %userprofile%\Documents and press Enter to set the Documents folder as the current working folder. If you are using a different working folder, specify that location instead.
    Note: You don't need to change to the working folder if you specify the full paths to the PVK, CER, and SPC files that will be used by the Pvk2Pfx.exe tool, in addition to the location for the PFX file.
  4. Type the location of the Pvk2Pfx.exe and the arguments that should be executed.

    The PFX file is created.