Tuesday, August 13, 2013

How to create your own ssl certificate

Developers have to use Digital Certificates very often. We can use self signed certificates to our development process rather than buying certificates from certificate authorities.

There are few simple steps to create our own certificates using visual studio.

Step 1

Open visual studio command prompt as administrator. You can get cmd as administrator by right click on short cut exists in visual studio tools and select run as administrator. (Not native windows command prompt)

Step 2:

Change the directory to where you want to create certificates. And type following command.



  • -sv yourprivatekeyfile.pvk is the name of the file containing the private key.
  • -n "cert name" is the name that will appear on the certificate (and in the certificate store).
  • yourcertfile.cer is the name of the certificate file.
  • -b mm/dd/yyyy is the date when the certificate becomes valid.
  • -e mm/dd/yyyy is the date when the certificate expires.
  • -r indicates that this will be a self-signed certificate.


Step 3:

Then you'll be prompted to enter the password for private key.


Step 4:

After you enter password you'll be prompted to enter password for sign certificate.


Step 5: 

This is the final step. Enter following command in cmd


Then it'll be prompted to enter private key password. Enter password and that's it.


  • -pvk yourprivatekeyfile.pvk is the private key file that you created
  • -spc yourcertfile.cer is the certificate file you created
  • -pfx yourpfxfile.pfx is the name of the .pfx file that will be created
You can see your certificates in hard disk






1 comment:

  1. I really appreciate you for sharing this detail. I am struggling to obtain an ssl certificate for my website but now with the help of this article I can easily create one. Thanks.
    digital certificates

    ReplyDelete