Formatting the PEM File

A PEM file must contain the following elements:
  1. Start with -----BEGIN CERTIFICATE-----
  2. A series of Base64 encoded data across multiple new lines.
  3. End with -----END CERTIFICATE-----

Example:

  1. Reformat the PEM file into JSON format (a single line with new-line characters \n added) using JSON Query.

    jq -sR . <Your_PEM_File>

  2. (Optional) If you do not have JSON Query installed, you can use JQ Playground online:
    1. Set the QUERY to full stop.
    2. Under Options, choose -s (Slurp: read into array) and -R (Raw input).
    3. Under JSON, copy and paste the PEM file content.

    After reformatting in the JSON format with a single line with the new-line \n characters inserted, your PEM file should look similar to this:

Continue with Configuring Cloud Explicit Proxy HTTPS.