Azure Service Principal Client Certificate Error

Hello,

we are trying to use a service principal and a client certificate as an authentication method to terraform azurerm, but we are facing some issues with the certificate we already generated,
this is the error shown below:

The Client Certificate Path is not a valid pfx file: pkcs12: unknown digest algorithm: 2.16.840.1.101.3.4.2.1

Can you please help with that issue,

Kind Regards,
Hamza

It is a clear bug or weakness of terraform , they can read only old Linux pkcs12 format:

just export with magic options :grinning:

openssl pkcs12 -certpbe PBE-SHA1-3DES -keypbe PBE-SHA1-3DES -export -macalg sha1  .......

Never give up while working with open source :v:

1 Like

Perfect. It worked for us when trying to transform .pem to .pfx

Thanks @AlexPaskhin You just saved my day :grinning: