Julien,

You could modify the code to read from something other than a file, which may not 
matter to you.

Frank


---------------------------------------- Message History 
----------------------------------------


From:  julien Bournelle <[EMAIL PROTECTED]>@openssl.org on 06/11/2002 06:00 
PM ZE2

Please respond to [EMAIL PROTECTED]

DELEGATED - Sent by:    [EMAIL PROTECTED]


To:    [EMAIL PROTECTED]
cc:
Subject:    Re: Read private key


>
> Not sure about PEM_read_RSAPublicKey, but the following call to 
>PEM_read_bio_RSAPublicKey works for me:
>
>     BIO * bio  = NULL;
>     RSA * rsa  = NULL;
>
>     bio = BIO_new (BIO_s_file ());
>
>     if (!bio)
>     {
>         // Handle error here.
>     }
>
>     if (BIO_read_filename (bio, publicKeyFile) <= 0)
>     {
>         // Handle error here.
>     }
>
>     rsa = PEM_read_bio_RSAPublicKey (bio, NULL, NULL, NULL);
>
> where publicKeyFile is a const char *.

that's interesting, but why using BIO ?

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to