Creating Self Signed Client Certificate

  • How to use makecert tool? How to install makecert to windows if it is missing?
  • How to create a root certificate and store in “Trusted Root CA” in windows certificate management console?
  • How to create client certificates for local testing of two way authentication?
  • How to configure IIS for client certificate authentication?

How to use makecert tool? How to install makecert to windows if it is missing?

After Windows 8, makecert is included in “Windows Software Development Kit (SDK)” and “Windows Driver Kit (WDK)”. So you need to install one of those first and then open the “Developer Command Prompt for VS2015” with Administrator privileges to use makecert. You can download Windows Software Development Kit (SDK) from Microsoft: https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk

How to create a root certificate and store in “Trusted Root CA” in windows certificate management console?

You can create the certificate which you will be using as the root certificate of your client certificates with the following command:

makecert -r -pe -ss my -sr LocalMachine -n "CN=MyRootCert" -sv "C:\Temp\MyRootCert.pvk" C:\Temp\MyRootCert.cer

How to create client certificates for local testing of two way authentication?

Now we will use the root certificate (MyRootCert) we have created before to sign our client certificates. Execute the following command:

makecert -n "CN=MyClient" -ss my -pe -sv "C:\Temp\MyClient.pvk" -iv "C:\Temp\MyRootCert.pvk" -ic "C:\Temp\MyRootCert.cer" C:\Temp\MyClient.cer
pvk2pfx -pvk C:\Temp\MyClient.pvk -spc C:\Temp\MyClient.cer -pfx C:\Temp\MyClient.pfx

How to configure IIS for client certificate authentication?

Now that we have the client certificate we need to configure our web application for mutual SSL from Internet Information Services (IIS)

--

--

I’m a software development enthusiast who likes trying different web technologies and adding value to his team.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mert Ilis

Mert Ilis

I’m a software development enthusiast who likes trying different web technologies and adding value to his team.