title: Certificate encodings with X509Certificates and keytool
body: <p>I am looking into X509Certificates and keytool and I am confused on the following:<br>
  A certificate can be stored in cer (Canonical Encoding Rules) format as well as in DER?<br>
  I am reviewing various tutorials by SUN on keytool and in some cases they seem to import a certificate ending in ".cer" or exporting one with the extension ".cer".<br>
  E.g.  </p>
  
  <pre><code>keytool -importcert -alias abc -file ABCCA.cer  OR  
  keytool -exportcert -alias mykey -file MJ.cer
  </code></pre>
  
  <p>Does this mean cer encoding?Because initially I had the impresion that if you do an export on keytool the default is der.<br>
  Or is cer and der interchangeable?  </p>
  
  <p>Thanks  </p>