I tried this to the users list yesterday, but didn't see it in the
archives.

Anyway, this is sort of following up to an older openssl-dev article
since i'm having a similar problem, and don't quite understand the
response in:

        http://www.mail-archive.com/[email protected]/msg09258.html

Since there were no further followups...

Ehsan Amiri wrote:

 > 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

Dr Stephen N. Henson responded:

 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.

My questions:

  - Does this mean that the PEM_write_XXX and PEM_read_XXX routines
    are not 'inverses' of each other?

  - What routines should one be using to read the public key back? 
    Should we be using the i2d_xxx routines directly or something else?

\p
---
If you have a skeleton in your closet, take it out and dance with it.
                --- Carolyn MacKenzie

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

Reply via email to