title: Import .pem public and private keys to JKS keystore
body: <p>I have public and private keys in separate .pem files that I would need to get into a JKS keystore somehow.</p>
  
  <p>Tried using the -import command in KeyTool for this, which gives an "not an X.509 certificate" error.</p>
  
  <p>I'm guessing the solution has to do with OpenSSL, but I'm not entirely sure what to do with it.</p>
  
  <p>Would really appreciate any help with this, since I'm completely clueless with everything crypto-related.</p>
  
  <p>Thanks in advance,
  --Rolf</p>