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
- "C:\Program Files\Microsoft SDKs\Windows\<version>\Bin\pvk2pfx.exe" - Specifies the location of the
Pvk2Pfx.exe tool.
- -pvk MyCert.pvk - Specifies the Private Key (PVK) file that should be used to create the PFX file. In this example, the file is named
MyCert.pvk.
- -pi MyPassword - Specifies the password assigned to the PVK file. In this example, the password is MyPassword.
- -spc MyCert.cer - Specifies the Certificate (CER) or Software Publisher Certificate (SPC) file that should be used to create the PFX file. In this example, the file is named
MyCert.cer.
- -pfx MyCert.pfx - Specifies the Personal Information Exchange (PFX) file that will be created by the
Pvk2Pfx.exe tool. In this example, the file is named
MyCert.pfx.
- -po MyPassword - Specifies the password to be assigned to the PFX file. In this example, the password is MyPassword.
To create the PFX file, do the following:
- 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.
- Click the Windows Start button Windows System Command Prompt to display the Windows Command prompt.
- 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.
- Type the location of the
Pvk2Pfx.exe and the arguments that should be executed.
The PFX file is created.