0

I have a CSR.txt certificate with the private key which is provided by the client and I want to convert that CSR file into .pem format.

I`m trying to convert the .csr file to .pem through OpenSSL.

Can anyone help me out with this issue?

shallu
  • 1
  • 4
  • Possible duplicate of [How to get .pem file from .key and .crt files?](https://stackoverflow.com/questions/991758/how-to-get-pem-file-from-key-and-crt-files) – Minijack May 20 '19 at 05:11
  • Can you give an example of a `CSR.txt certificate`? I'm not at all sure what that means. – bartonjs May 20 '19 at 06:08
  • -----BEGIN CERTIFICATE REQUEST----- MIIE4TCCAskCAQAwgZsxCzAJBgNVBAYTAkRPMR0wGwYDVQQD...... -----END CERTIFICATE REQUEST----- -----BEGIN PRIVATE KEY----- MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDcCtWvZMvfni7y....... -----END PRIVATE KEY----- – shallu May 20 '19 at 06:10
  • CSR.txt file containing private key and certificate as per above sample – shallu May 20 '19 at 06:12
  • This is wired, CSR generally will not contain PRIVATE KEY, from where you are getting such files? – Bharat Vasant May 20 '19 at 23:33
  • Is there any way to convert .csr to .pem format? – shallu May 23 '19 at 06:25
  • @BharatVasant, ya it's weird but they provided this text file for testing environment. – shallu May 23 '19 at 06:30
  • Just copy ` -----BEGIN CERTIFICATE REQUEST----- MIIE4TCCAskCAQAwgZsxCzAJBgNVBAYTAkRPMR0wGwYDVQQD...... -----END CERTIFICATE REQUEST-----` and save it with the extension `.pem` and you are done – Daniel Fisher lennybacon May 23 '19 at 13:21
  • .pem file created as above will not have Private Key and may not be useful for signing or encryption. – Bharat Vasant May 24 '19 at 00:09

0 Answers0