title: RSA decrypt message
body: <p>My programs fails when I try to decrypt encrypted messages. My code:</p>
  
  <pre><code>char   *pri_key[] = "some key"; // ---&gt; some key, that i've got from server
  
  RSA *rsa;
  BIO *keybio;
  keybio = BIO_new_mem_buf(pri_key, strlen(pri_key));
  rsa = PEM_read_bio_RSAPrivateKey(keybio, &amp;rsa, NULL, NULL);
  
  // Decrypt it
  // Encoded message is in buff
  char *decrypt = new char[BUFF_SIZE];
  int decrypt_len = RSA_private_decrypt(BUFF_SIZE, (unsigned char*)buff, (unsigned char*)decrypt,
      rsa, RSA_PKCS1_OAEP_PADDING); // ------&gt; it fails here
  </code></pre>
  
  <p>What is the problem?</p>