> The equivalent of the length function actually does not get the
> correct encoding but just make an estimation, giving 5 length octets
> or other hints for integers for example. This allows for a faster code
> especially when lot's of structures are involved. Note that the
> actual put routines do the length stuff twice.

The UMich LDAP code allocates worst-case five bytes for length on nested
structures and sequences. It keeps a stack and then goes back and
patches in the real length and memmove's the data shrinking up the
holes.  The most current OSS incarnation is in openldap,
libraries/liblber/encode.c; look for the "sos" fields and the seqorset
structure.
        /r$
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to