Dave Clark wrote:
>
>
> >There's lots of user's (well, developer's) habits, shortcuts..etc
> >based on this concept already so it's unlikey to get changed easily.
> >What for do you need length of der-decoded objects?
>
> After verifying an X509 cert chain, I want to write the DER-encoded
> objects to separate disk files, using calls to the usual C RTL fwrite()
> function which requires the length. Is there a more straightforward way
> of doing this with OpenSSL?
>
> Thanks for your help, I appreciate it.
>
Err you can use i2d_X509_fp(fp, x509) to write the DER encoding to a
FILE pointer directly given an X509 certificate structure. There is also
a BIO version if you are using BIOs.
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]