Create SSL Certificate By Makecert.exe

Certificates are mainly used to communicate with https protocol. For http protocol we don't need certificate but for https protocol we need certificate.

Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP, the protocol over which data is sent between your client and the server. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted.

We can say that

HTTPS=HTTP+S (Secure)

HTTPS always run in Port No. 443.

Here I have explained how to create the Certificate using makecert.exe.

To create Certificate Open the Visual Studio Command Prompt.

Run as Administrator,

 

Now write the following command and paste it on the command prompt.



Here is the command,

Makecert -r -pe -n CN="MycomputerCertificate" -b 05/10/2010 -e 12/22/2011 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localmachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

Here are the different options:

  • CN specify the Certificate name. Here the certificate name is "MycomputerCertificate".
  • -b specifies the start date when the certificate first becomes valid.
  • -e specify the end date.

Now to check open the following Microsoft document here.

Now the certificate will be created which show the success message. So in this way we can create certificate by Makecert.exe.

We can also create certificate by IIS.

Now we can associate the certificate to a website with https protocol.

Now to associate the certificate with a website open the site in IIS.

 

Now Right Click on the website and select "Edit Binding".

 

Now add Binding.

 

When you select Type to HTTPS automatically a dropdown for selecting SSL Certificate will get created.

Now to see the certificate click on View. It will show the certificate as follows.

 

If we click Details it shows the following details of the Certificate.

 

Now the version of the certificate is V3.

 

Now we have configured the site with https protocol and implemented SSL with the Certificate.