title: Keytool error: Failed to establish chain from reply
body: <p>I'm having an error in importing the trial SSL certificate from CA. Below is my steps in creating the keystore. Please correct me if I'm wrong. Thank you in advance!</p>
  
  <p>1.First, I created a keystore to be put in the server.</p>
  
  <pre><code>keytool -keystore server_keystore.jks -genkey -alias server -keyalg rsa -keysize 2048</code></pre>
  
  <p>2.Created a CSR.</p>
  
  <pre><code>keytool -keystore server_keystore.jks -certreq -alias server -keyalg rsa -file server.csr</code></pre>
  
  <ul>
  <li>Sent the CSR to CA (Thawte) and replied with three trial certificate namely, CA root, CA intermediate and trial SSL. Saved it to a text file with file extension .cer. (trial_ca_ssl.cer, trial_ca_root.cer, trial_ca_intermediate.cer)</li>
  </ul>
  
  <p>3.Tried to import the trial_ca_ssl.cer in server_keystore.jks but I received an error.</p>
  
  <pre><code>keytool -import -keystore server_keystore.jks -file trial_ca_ssl.cer -alias server</code></pre>
  
  <p>Error:</p>
  
  <pre><code>keytool error: java.lang.Exception: Failed to establish chain from reply</code></pre>