The file extensions for cryptographic certificates are not really as standardized as you expected. Windows by default considers double-clicking on the .crt file as a request to import a certificate into the Windows root store, but treats the .cer file as a request to view the certificate only. Thus, they are different in this sense, at least that Windows has some peculiar value for what happens when you double-click on each type of file.
But the way Windows handles them when you double-click them is the only difference between them. Both extensions simply represent that it contains a public certificate. You can rename the file or use it instead of another in any system or configuration file that I saw. And on platforms other than Windows (and even on Windows), people are not particularly careful about which extension they use, and treat them as interchangeable, as there is no difference between them if the contents of the file are correct.
To make things more confusing, there are two standard ways to store certificate data in a file: One is the βbinaryβ X.509 encoding, and the other is the βtextβ base64 encoding, which usually starts with " -----BEGIN CERTIFICATE----- ". They encode the same data, but in different ways. Most systems accept both formats, but if you need to, you can convert one to the other via openssl or other tools. But the encoding in the certificate file really does not depend on what extension someone gave to this file.
If you have specific questions about the difficulties of using a certain type of file with a specific program, it would be better to write a separate question that describes what kind of file you have and what your application expects.
Peter Cooper Jr. Mar 13 '09 at 12:01 2009-03-13 12:01
source share