-2

I have two files.One is 5474dd9b93888948.crt and another is gd_bundle-g2-g1.crt. I have to convert this two files into 'PEM encoded X.509 certificate' and 'Unencrypted PEM encoded RSA private key'.

can any one tell me openssl commands for it ?

RBP
  • 481
  • 1
  • 9
  • 29
  • [How to get .pem file from .key and .crt files?](https://stackoverflow.com/q/991758/608639) – jww Jan 08 '19 at 06:46

1 Answers1

4

File names like foo.crt do not say anything about the file format used. Look into the files content. If this looks binary they are probable DER encoded and you have to specify the -inform der option with the openssl tools (e.g. openssl x509 -inform der -in file.crt to convert the certificate to PEM, same for rsa command). If they contain text starting with something like -----BEGIN CERTIFICATE----- they are already PEM encoded.

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172