If you obtain the public certificate and private key in a single file, use the openssl command to extract and save both files separately in PEM format.
Ensure that the public certificate file begins with
“-----BEGIN CERTIFICATE-----”
and ends with
“-----END CERTIFICATE-----”
. Delete any text present before
“-----BEGIN CERTIFICATE-----”
and after
“-----END CERTIFICATE-----”
.
Run the following commands to extract the public certificate and private key: