title: keytool: import certificate chain from several .cer files
body: <p>Our IT dept gave me 4 .cer files, that constitute certificate chain: thawte_root.cer->intermediate1_pem.cer->intermediate2_pem.cer->our_company.cer.</p>
  
  <p>I need to sign some code (via jarsigner) using our_company.cer.</p>
  
  <p>Therefore, I have to create a keystore, containing our_company.cer and the chain-to-the-root.</p>
  
  <p>I've tried to simply concatenate these 4 files into one using notepad and then import the resulting file, but keystore imports only the first one and when I try to launch jarsigner, I get </p>
  
  <pre><code>"jarsigner: Certificate chain not found for: our_company. our_company must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain."
  </code></pre>
  
  <p>I get the same message when I import only our_company.cer or when I import each certificate one-by-one.</p>
  
  <p>So the question is: how can I import 4 certificates as one chain?</p>
  
  <p>Thanks in advance. Vitaly.</p>