At 10:46 PM 06/03/1999 , Vadim Fedukovich wrote:
>> 
>> Hello;
>> 
>> I'm attempting to convert a buffer containing a sequence of
>> DER-encoded objects into a set of X509 objects.
>> 
>> The documentation for d2i_TYPE:
>> 
>>     TYPE *d2i_TYPE(a, pp, length)
>>     TYPE **a;
>>     unsigned char **pp;
>>     long length; 
>> 
>> says that "*pp will be updated to point to *pp + length, so that d2i can be
>
>"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.

>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.

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

Reply via email to