-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Related command
openssl req -new -x509 -nodes -out aks-ingress-tls.crt -keyout aks-ingress-tls.key -subj "/CN=$Hostname" -addext "subjectAltName=DNS:$Hostname" | Out-Null
Describe the bug
Azure Cloudshell CLI throws error: We could not parse the provided certificate as .pem or .pfx. Please verify the certificate with OpenSSL. when using az keyvault certificate import
To Reproduce
Run following command to generate .pfx file
openssl pkcs12 -export -in aks-ingress-tls.crt -inkey aks-ingress-tls.key -out aks-ingress-tls.pfx | Out-Null
Run following command to reproduce error:
az keyvault certificate import --vault-name $AKVName -n $AKVCertName -f aks-ingress-tls.pfx | Out-Null
Expected behavior
Command should import .pfx certificate in Azure Key Vault
Environment summary
-
Azure Cloud Shell. Powershell Mode.
-
azure-cli verison is 2.42.0
-
Extensions: aks-preview v.0.5.115
Additional context