The official website of Bipul Raman

Create Self-Signed Certificate (.cer & .pfx)

No comments

Steps to create self signed certificate on Windows:
  1. Open visual studio Developer Command Prompt as administrator  
  2. 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
    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"
  3. Install the pfx file for current machine or current user as per requirements

UPDATE: (April 15, 2019)
Use this powershell command to create self signed certificate as MAKECERT command has been depretiated.

No comments :

Post a Comment