Convert user keys and certificates to PEM format for Python clients

Before you begin

You need user certificates and keys for this configuration.

About this task

Python supports certificates and keys only in PEM format. If you will be using a Python client to connect to Platform Application Center, or pacclient.py, you need to convert your key and certificate files to PEM format.

Procedure

  1. Convert your user key and certificate files to PEM format.
    1. Get the .key.pem file.

      For example:

      openssl pkcs12 -nocerts -in my.p12 -out .key.pem
    2. Get the .cert.pem file.

      For example:

      openssl pkcs12 -clcerts -nokeys -in my.p12 -out .cert.pem
    3. Remove the passphrase from the key.

      For example:

      openssl rsa -in .key.pem -out key_nopass.pem
      mv key_nopass.pem .key.pem
  2. Copy the .key.pem and .cert.pem files to the same directory as your client program.