Freigeben über


Using the Azure Management APIs from Linux

If you want to use the Azure Management APIs from Linux, there are a few things you need to do so that it will work correctly.  If you are getting a problem when you try to connect where it looks like the Azure side is just closing the connection, there are a few things that could be the problem.

There are the standard things that you need to make sure you do:

  • Make sure the certificate is at least 2048 bits
  • Make sure the certificate is uploaded and listed in the Azure portal under the management certificates

But assuming those things are all correct, you also need to make sure you use the SSL_CTX_set_mode function to set the following OpenSSL options:

  • SSL_MODE_AUTO_RETRY
  • SSL_ENABLE_PARTIAL_WRITE

That should allow you to connect to the management APIs.

You can also take a look at this forum post to see how to get curl to connect.  This can be really helpful as curl has all of the source code so you can use that to see how to connect.

For more information on how to do this kind of thing from windows, take a look at this MSDN article.