Creating a Certificate (Private and Public Keys)
For private key:
-
Go to the Start menu & click Administrative Tools > Internet Information Services (IIS) Manager and click the server's name in the Connections column on the left and double click Server Certificates.
-
Click Create Self-Signed Certificate in the Actions column on the right.
-
Type any meaningful name and then click OK to proceed.
Once that is complete, you should now see the SSL in the list of Self-Signed certificates. Now, you have IIS Self-Signed Certificate with 1 year validation.
-
Right-click on that certificate and click Export.
Specify the path, type the password, confirm the password, and click OK. Now, you have exported the Private key.
For public key:
-
Launch Microsoft Management Console. Press Win+R, type
mmc.exeand click OK. -
Click File and select the Add/Remove Snap-in option.
-
Click Certificates in the list of Available snap-ins and then click Add.
-
Select Computer account and click Next. Choose Local Computer and click Finish.
-
Click OK to add the certificate snap-in and get back to console.
-
Expand the Personal folder in the left-side menu and choose Certificates.
-
Right-click the certificate you want to export - All Tasks > Export.
-
On the prompt menu, click Next.
-
Click No. Do not export the private key.
-
Choose Base-64 encoded X.509 (.CER) and click Next.
-
Fill in the file path and click Next.
-
Click Finish and now you have the Public key.
Related information