简体   繁体   中英

How to convert .crt file into .pem format

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 ?

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 (eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM