tags:

views:

7076

answers:

2

I need to setup Apache 2 server with SSL.

I have my *.key file, but my certificate issuer has provided me with a *.cer file.

In all documentations around the net, they are for *.crt certificates.

Please let me know, are *.cer same as *.crt.

If now, How can I convert CER to CRT format?

+3  A: 

I believe that a CRT is the same as a CER, but the extension indicates that it's the public certificate of a root authority. They should be interchangeable.

If there are specific problems you have while trying to use it, perhaps you could post about what the problems are?

Peter Cooper Jr.
I was able to use CER the same war as CRT. Thanks :)
Mohit Nanda
+1  A: 

The .cer and .crt file should be interchangable as far as importing them into a keystore.

Take a look at the contents of the .cer file. Erase anything before the -----BEGIN CERTIFICATE----- line and after the -----END CERTIFICATE----- line. You'll be left with the BEGIN/END lines with a bunch of Base64-encoded stuff between them.

-----BEGIN CERTIFICATE-----
MIIDQTCCAqqgAwIBAgIJALQea21f1bVjMA0GCSqGSIb3DQEBBQUAMIG1MQswCQYD
...
pfDACIDHTrwCk5OefMwArfEkSBo/
-----END CERTIFICATE-----

Then just import it into your keyfile using keytool.

keytool -import -alias myalias -keystore my.keystore -trustcacerts -file mycert.cer
CoverosGene