How can I convert .csr into .pem file format as I have to submit csr in pem format

vikas pandit picture vikas pandit · May 20, 2019 · Viewed 9.3k times · Source

I have to submit CSR in pem format.

I have generated CSR using OpenSSL but got stuck in converting it into PEM format.

I have to obtain example - csr.pem from example.csr. How it can be done?

Answer

garethTheRed picture garethTheRed · May 20, 2019

OpenSSL creates CSRs in PEM format by default.

If you generated the CSR without the -outform option, the CSR will already be in PEM format.

If you did use the -outform DER option, you can convert with:

openssl req -inform DER -in <original CSR file> -out <converted CSR file>

The .pem file extension is just a name. If the file is in PEM format, simply change the extension on the file from .csr to .pem.