>
...
> >"length" here is not parameter value but the size of object just decoded
>
> Ah, OK ... this was my misunderstanding.
>
> So I can compare the before and after values of *pp to determine the length
> of the decoded DER object.
sure
> >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?
It seems no.
You can try i2d_X509() to place certificate in memory buffer if you sure
it was completely parsed by OpenSSL.
yours,
Vadim Fedukovich
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]