1

I have an SSL certificate client.ks & client.ts that I would like to import into Azure Key Vault but it only accepts .PEM format.

I tried to concatenate the two files into one via cat client.ks client.ts > client.pem but I got the error when loading it:

The specified PEM X.509 certificate content can not be read. Please check if certificate is valid PEM format.

Any suggestions into how I get those two files in the keyvault ?

deltascience
  • 3,321
  • 5
  • 42
  • 71

1 Answers1

0

You can store any file as a keyvault Secret if you base64 encode it and the total size is less then 25kb.

For example from the cli:

OUTPUT="$(base64 -w0 < example.txt)" & az keyvault secret set --name mysecret --vault-name myvault --value $OUTPUT

When retrieving the secret you can decode it and write the output to file.

For more details refer this thread

ShrutiJoshi-MT
  • 1,622
  • 1
  • 4
  • 9