Skip to content

Instantly share code, notes, and snippets.

@artyom
Created February 5, 2016 07:28
Show Gist options
  • Select an option

  • Save artyom/27509f6b15beb0e68e5e to your computer and use it in GitHub Desktop.

Select an option

Save artyom/27509f6b15beb0e68e5e to your computer and use it in GitHub Desktop.

Convert .cer certificate exported from Keychain.app to PEM format:

openssl x509 -inform der -outform pem -in moonist-ca.cer -out moonist-ca.pem

Convert .p12 bundle (certificate + key) exported from Keychain.app to PEM format:

openssl pkcs12 -in grafana.p12 -out grafana.pem -nodes

Then split resulting pem file into two separate files (certificate and key) using text editor.

Note: CA certificate (and all intermediate ones) should be «chained» into leaf certificate pem file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment