title: How to use SSL certificate in Spring-Boot and generating Public-key for android clients
body: <p>I've got a certificate from <a href="https://sslforfree.com" rel="nofollow noreferrer">sslforFree.com</a> that it contains 3 files:</p>
  <p>1-ca_bundle.crt</p>
  <p>2-certificate.crt</p>
  <p>3-private.key</p>
  <p>I could config my Spring-Boot application with a self-signed certificate that was created by Java key tools, now my question is that how can I use these three files??</p>
  <p>I expected that there should be just one file that I can put it into my Keystore, but now there are 3 files and I don't know how to use them.</p>
  <p>On the other hand, I have android applications as a client. It needs to have a <strong><code>.pem</code></strong> file as a certificate that contains a public-key as below format(I mean just the value of the tags):</p>
  <pre><code>&lt;pin-set&gt;
  &lt;pin digest=&quot;SHA-256&quot;&gt;k3XnEYQCK79AtL9GYnT/nyhsabas03V+bhRQYHQbpXU=&lt;/pin&gt;
  &lt;/pin-set&gt;
  </code></pre>
  <p>Now how can I generate <strong><code>.pem</code></strong> file contains a public-key with this format?</p>
  <p>I have searched and also found some commands to concatenate <strong><code>.crt</code></strong> and <strong><code>.key</code></strong> files and the result is <strong><code>.pem</code></strong> but it contains some Base64 text that includes these at the start and the end of the file:</p>
  <p>-----BEGIN CERTIFICATE-----</p>
  <p>xxxxx</p>
  <p>-----END CERTIFICATE-----</p>
  <p>-----BEGIN RSA PRIVATE KEY-----</p>
  <p>xxxxx</p>
  <p>-----END RSA PRIVATE KEY-----</p>
  <p>How can I create a public-key for clients?</p>
  <p>And do I need to put that <strong><code>.pem</code></strong> file into my Keystore??</p>
  <p>Any help would be appreciated!!</p>