title: Convert .pem and .pub to .pfx file
body: <p>I have a .pem file and a .pub file, I used following commands to create them</p>
  
  <pre><code>openssl genrsa -out temp.pem 1024
  openssl rsa -in temp.pem -pubout -out temp.pub
  </code></pre>
  
  <p>Now I want to make them to a one .pfx file which is binary and contains both private and public key. Is it possible? how? (I have tested som openssl commands but the file was empty).</p>
  
  <p>I used this command </p>
  
  <pre><code> openssl pkcs12 -export -in temp.pem -inkey temp.pub -out temp.pfx -name "Temp Certificate"
  </code></pre>
  
  <p>it generates this error: </p>
  
  <p>unable to load private key
  17880:error:0906D06C:PEM routines:PEM_read_bio:no start line:.\crypto\pem\pem_li
  b.c:703:Expecting: ANY PRIVATE KEY</p>