I have run into an issue with Azure cloud services that has me a bit stumped. I am working on a project that interacts with a 3rd party REST API which requires all requests to be signed with an SSL cert. In development or on a production VM this is a non-issue. The certificates are typically installed in the appropriate stores and then can be loaded by thumbprint, from a file on disk or from an embedded resource like this:
_certificate = new X509Certificate2(Properties.Resources.Cert,
"password, X509KeyStorageFlags.MachineKeySet);
I am now trying to migrate a portion of the system to Azure and am having difficulty getting the certificate working. The issue I believe is the intermediate certificate from Symantec that is not already installed. So far I have tried writing both Powershell and batch files (i.e. certutil), I have written C# code to walk the certificate chain as well as to iterate over the collection of certs and perform the various imports but none of them have allowed for a successful call with the cert.
Has anyone automated the installation and usage of a signing cert in an Azure cloud service and if so would you mind sharing the solution?