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 (http://msdn.microsoft.com/en-us/library/windows/hardware/ff550672(v=vs.85).aspx).

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. Do one of the following to display the Windows Command prompt:
    • Windows 7: Click the Windows Start button All Programs Accessories Command prompt.
    • Windows 8: On the Windows Start screen, right-click (or use the swipe up gesture from the bottom edge of the screen) and click All Apps. Scroll to the Windows System section, and click Command Prompt.
    • Windows 8.1: On the Windows Start screen, click the All Apps button located near the lower-left corner of the screen (or use the swipe up gesture from the bottom edge of the screen). Scroll to the Windows System section, and click Command Prompt.
      Tip: On Windows 8/Windows 8.1, on the Start screen, type command and click Command Prompt in the Search pane.
    • Windows 10: Click the Windows Start button All Apps Windows System 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.