title: unable to load rsa public key if it's created using c++
body: <p>I created rsa key pair in c++ using RSA_generate_key method and write public key to a separate file. When I tried to encrypt a text using that public key through commandline, I'am getting "Unable to load public key" error. Please some one help me on this...</p>
  
  <p>command used for encryption</p>
  
  <pre><code>openssl rsautl -encrypt -inkey public.pem -in myfile.txt -out file.ssl
  </code></pre>
  
  <p>function used to generate keys </p>
  
  <pre><code>RSA_generate_key(1024,3,0,0);
  </code></pre>
  
  <p>Thanks.</p>