On Wed, Jul 20, 2005, Edward Chan wrote: > Hmm, well, I guess I assumed i2d_RSAPublicKey() was ok since the RSA key > seems fine (I ran RSA_check_key() on it and it says it is ok). Is there > any reason why i2d_RSAPublicKey() would not be returning me valid data? >
Normally only if it is not called correctly. > int len = i2d_RSAPublicKey(rsa, 0); > > returns me something > 0, so I assumed that it is fine. Wouldn't this > return -1 if it failed? > Currently most i2d functions will never return -1 though that may change in future. > As for the usage of i2d_RSAPublicKey(), it is as the book says. I call > it once to find the size of the buffer required. Then I allocate the > buffer. Then call it again to actually fill the buffer. Is this not > correct? > What code are you using to fill the buffer? Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]