tags:

views:

26

answers:

2

Hello,

I am working on an Azure project. To secure this site, I wanted to install a SSL certificate. So when I uploaded .pfx file, I am getting error message "Uploaded file is not a valid X.509 Certificate, or the password is invalid. " when I try to upload a certificate. I was able to do the same without any issue last week. Kindly share the steps to fix if you have faced similar issue.

Thanks

A: 

I raised the same question in Azure forum and I got replies from Moderators. Please find it here http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/2fd926f4-d732-4a10-8b58-c1079fb93e72#2fd926f4-d732-4a10-8b58-c1079fb93e72

joe
A: 

Friends, I got the solution from msdn forum and here is the solution.

$apiCert = get-item cert:\CurrentUser\MY\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$subscription_id = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Add-Certificate -SubscriptionId $subscription_id  -serviceName <servicename> -CertificateToDeploy .\<servicename>.cloudapp.net.pfx -password xyz -certificate $apiCert

You will have to save this as a powershell script (.ps1) and run it in power shell. You will have to install the azure add on in powershell from http://code.msdn.microsoft.com/azurecmdlets/Wiki/View.aspx?title=Sample%20Scripts&amp;referringTitle=Home

Thanks

joe