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 (http://msdn.microsoft.com/en-us/library/bfsktky3(v=vs.110).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:
- 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.
- 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.