Ehsan Amiri wrote:
>
> Hi All
>
> I create a RSA key using "RSA_generate_key" and then
> public and private parts to two different files using
> this functions:
>
> PEM_write_bio_RSAPublicKey &
> PEM_write_bio_RSAPrivateKey
>
> but when I want to instantiate an "RSA *" by calling
> the function
>
> PEM_read_bio_RSA_PUBKEY
>
> to read public part from the file, the function
> returns NULL and I receive this error:
>
> error:0906D06C:PEM routines:PEM_read_bio:no start line
>
> Can anyone help me resolving this problem?
>
They are different and incompatible formats, that's expected behaviour.
The RSA_PUBKEY variant may be preferable because it's more standard and
is extendible to non-RSA algorithms.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]