Create X.509 certificate for a Windows Azure Web Role



To know how to create a X.509 certificate for a Windows Azure web Role we need to first understand why we need a certificate for a role. It authenticates whether an operation on an Azure subscription is authenticated or not. Certificates help with Authentication.

There are two types of certificates

  1. Management certificates
  2. Service certificates

Management Certificates

This is a subscription level certificate. It is independent of any particular hosted service. This stores the certificate for a Windows Azure subscription.
X.509 certificates are an example of this certificate.

Service certificates

This is a hosted service lever certificate. This stores the service for a hosted service.

A personal information exchange certificate is an example of this type of certificate.

To create a X.509 certificate, the first step you need to do is to open a Visual Studio command prompt. Go to Start and open Visual Studio 2010 Tools and select Visual Studio Command Prompt.

Certificate1.gif

If you want to explore the various basic options available with the makercert command then Run the command:

MakeCert -?

Certificate12.gif

To create a certificate we can run the command with any combination of options available with MakeCert.exe.

I am creating a certificate here with the name debugmode.

Certificate3.gif

In the command prompt, it would look like:

Certificate4.gif

An explanation of the various options I am using in the above command is as below:

Certificate5.gif

After running the above command you will find a X.509 certificate with the name debugmode that has been created in the folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC.

Right-click on the certificate and you will get an option to install the certificate.

Certificate6.gif

If you select to install, the certificate install wizard will be opened for you.

Certificate7.gif

Either you can choose the store for the certificate or let the wizard search a store for you.

Certificate8.gif

There is one more way to create X.509 certificate using IIS. Open Inetmgr:

Certificate9.gif

In the center you will get an option of Server Certificates. Double-click on that.

Certificate10.gif

In the left pane you will get an option to create a server certificate. Select Create Self-Signed Certificate.

Certificate11.gif

Just follow the wizard to create the self-signed certificate.

Certificate12.gif

These are two ways to create X.509 certificates. Tune in for the next article.

erver'>
Up Next
    Ebook Download
    View all
    Learn
    View all