Copy the PEM key from your buffer into a BIO instance (using BIO_write for 
example), and then use PEM_read_bio_RSAPrivateKey.

Jason

On Jul 29, 2012, at 5:52 AM, Jonas Schnelli <jonas.schne...@include7.ch>
 wrote:

> Hi
> 
> I can read in a RSA private key from file without problems (with 
> PEM_read_RSAPrivateKey).
> But now i would like to read in a PEM RSA Key from a "void *buffer" with 
> "size_t length".
> How can i do this? PEM_read_RSAPrivateKey only reads from FILE.
> I'm sure theres a ways to work around writing a tmp file.
> 
> Thanks for the help
> --
> </jonas> 
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to