Create Self-Signed Certificate (.cer & .pfx)
Posted by Bipul Raman on October 18, 2018.Steps to create self signed certificate on Windows:
- Open visual studio Developer Command Prompt as administrator
- Execute below mentioned commands in sequential order. It will create a certificate with SHA.256
algorithm.You can modify parameters as per your requirements.
Command format:makecert –a SHA256 -sv SAMPLE.pvk -n "cn=SAMPLE" SAMPLE.cer -b <start_date> -e <end_date> -r
pvk2pfx -pvk SAMPLE.pvk -spc SAMPLE.cer -pfx SAMPLE.pfx
Example:makecert –a SHA256 -sv "C:\Sample.pvk" -n "cn=Sample" "C:\Sample.cer" -b "10/22/2018" -e "10/22/2019" -r
pvk2pfx -pvk "C:\Sample.pvk" -spc "C:\Sample.cer" -pfx "C:\Sample.pfx"
- Install the pfx file for current machine or current user as per requirements