You can make your own digital certificate for testing or distributing your applications inside your company. A digital certificate can be created with the Make Certificate (MakeCert.exe) tool that is part of the Windows SDK. You can learn more about the
MakeCert.exe tool from Microsoft's website (https://msdn.microsoft.com/library/windows/desktop/aa386968.aspx).
Note: Prior to releasing your custom program files, it is recommended to obtain a digital certificate from a vendor such as Symantec ™
and DigiCert ®
. Then use that digital certificate for the final release.
The following is an example of making a private key and digital certificate with the
MakeCert.exe tool:
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\MakeCert.exe" -r -sv MyCert.pvk -n "CN=DevABC" MyCert.cer -b 12/22/2014 -e 12/31/2015
- "C:\Program Files\Microsoft SDKs\Windows\<version>\Bin\MakeCert.exe" - Specifies the location of the
MakeCert.exe tool.
- -r - Indicates that the certificate is self-signed.
- -sv MyCert.pvk - Specifies the location of the subject's file for the certificate. In this example, the file is named
MyCert.pvk.
- -n "CN=DevABC" - Specifies the publisher's name for the certificate. In this example, the name is DevABC.
- MyCert.cer - Specifies the name of the file that the certificate will be exported to. In this example, the exported certificate is stored in a file named
MyCert.cer.
- -b 12/22/2014 - Specifies the start date of the digital certificate. In this example, that date is 12/22/2014.
- -e 12/31/2015 - Specifies the end date of the digital certificate. In this example, that date is 12/31/2015.
To make the digital certificate, do the following:
- 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 want to use a different working directory, specify that location instead.
- Type the location of the
MakeCert.exe and the arguments that should be executed.
- In the Create Private Key Password dialog box, in the Password and Confirm Password text boxes, enter the password to secure the certificate. Click OK.
- In the Enter Private Key Password dialog box, type the password for the certificate and click OK.
The Private Key (PVK) and Certificate (CER) files are created.