Skip to content

We could not parse the provided certificate as .pem or .pfx. Please verify the certificate with OpenSSL. #24668

@ARaheem-Work

Description

@ARaheem-Work

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

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamKeyVaultaz keyvaultOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.customer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions