> 
> It is my understanding that an i2d function should return the length of the
> identifier, length and content octets, and that in the case described below
> i2d_ASN1_OBJECT did not. That's all.
> 
> Based on Steve's message (which I read after sending my message), this has
> been fixed.
> 
Right, it seems that the other functions behave like that. 

Anyway this reminds me to some functionality that I have seen some
tern years ago other asn1 implementations:

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 implemenation was beating xdr encoders by a factor of almost 2. 

I also remember another encoder that encoding in an inverted way
from the end of the buffer after estimation of the length. No
performance figures here.


Well, just some thoughts. 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to