~jtv/gwacl/storage-tool-command-line

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
GWACL - The Go Windows Azure Client Library.

Random notes, clean this up later
=================================

To generate an x509 key to talk to Azure
----------------------------------------

Run this:

   openssl req -config /usr/share/ssl-cert/ssleay.cnf -x509 -nodes -days 3650 -newkey rsa:2048 -keyout azure.pem -out azure.pem

And then export a certificate that you can upload to Azure's management portal
(see http://msdn.microsoft.com/en-us/library/windowsazure/gg551726.aspx):

   openssl pkcs12 -export -out azure.pfx -in azure.pem

It'll prompt you for a password.  For our purposes, just leave it blank.

Note the use of the ssleay.cnf - it just contains some crappy defaults so you
don't get prompted for certificate data.  You can leave it out if you want, but
then you'll need to enter country, organisation etc.

Azure wants you to upload a .cer file (which is in DER format).  Here's how you
can extract a .crt file from the .pfx:

    openssl x509 -inform pem -in azure.pem -outform der -out azure.cer

You can now upload azure.cer to Azure as a management certificate.