title: Need help converting P12 certificate into JKS
body: <p>I need some help converting my .P12 certificate file into a JKS keystore. I've followed the standard commands using Java's keytool utility. However, when I try and use the resulting JKS file to access the WS endpoint via SOAPUI, I get a 403.7 error - Forbidden: SSL certificate is required. Using the P12 file with SOAPUI against the same endpoint produces a successful response. 
  Here is the standard command for importing a P12 keystore into a JKS keystore - </p>
  
  <pre><code>keytool -importkeystore -srckeystore src.p12 -srcstoretype PKCS12 -deststoretype JKS -destkeystore target.jks
  </code></pre>
  
  <p>I also tried using openssl to convert the P12 -> PEM -> DER -> JKS:</p>
  
  <pre><code>openssl pkcs12 -in src.p12 -out src.pem -clcerts
  </code></pre>
  
  <p>(Edit src.pem into its two composite parts called src.key and src.cer)</p>
  
  <pre><code>openssl pkcs8 -topk8 -nocrypt -in src.key -out key.der -inform PEM -outform DER
  openssl x509 -in src.cer -inform PEM -out cert.der -outform DER
  </code></pre>
  
  <p>(I ran a utility to combine the two keys into keystore.ImportKey )</p>
  
  <pre><code>keytool -importkeystore -srckeystore keystore.ImportKey -destkeystore target.JKS
  </code></pre>
  
  <p>and similiarly no dice.</p>
  
  <p>Is there something I'm missing?</p>