title: Create java keystore from private key and CA certificate bundle
body: <p>I am new to configure Jetty Server for SSL. I followed steps from <a href="https://www.digicert.com/csr-creation-apache.htm" rel="noreferrer">digcert</a> I created <strong>private key file</strong>, <strong>Certificate Request</strong> CSR file. </p>
  
  <p>I sent Certificate Request to CA and got my signed CSR back. But CA sent me a bundle with two certificates, one is my certificate signed by CA and second is CA Certificate.(1. star_xyx_abc_com crt file, 2.DigiCertCA crt file). Now I am facing trouble to create a keystore from these files. </p>
  
  <p>When I used <strong>keytool</strong> to create <strong>keystore</strong> by following <a href="https://docs.oracle.com/cd/E19509-01/820-3503/6nf1il6er/index.html" rel="noreferrer">Oracle docs</a> steps 4,5 and 6, I got an error</p>
  
  <pre class="lang-none prettyprint-override"><code>keytool error: java.lang.Exception: Certificate not imported, alias already exists. 
  </code></pre>
  
  <p>when I used <strong>openssl</strong> to create <strong>pkcs12</strong> I got </p>
  
  <pre class="lang-none prettyprint-override"><code>Loading 'screen' into random state - done 
  Error unable to get issuer certificate getting chain.
  </code></pre>
  
  <p>error.</p>
  
  <p>How can I generate KeyStore from private key file, my certificate signed by CA and CA Certificate ?</p>