Peter,

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.

Frank

> -----Original Message-----
> From: Peter Sylvester [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 22, 2000 9:50 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Several issues concerning ASN1 in OpenSSL
> 
> 
> > 
> > In 1, if i2d_ASN1_OBJECT's second argument is 0 (or NULL), 
> ASN1_object_size
> > returns the complete length of the object identifier including:
> > 
> > identifier octets
> > length octets
> > content octets
> > 
> > This is good.
> > 
> > If i2d_ASN1_OBJECT's second argument is not 0, only the 
> length of the
> > content octets is returned. This is bad. In most cases the 
> difference will
> > be two, but not necessarily.
> > 
> > Unfortunately, I do not have a fix, yet.
> 
> What is bad here? 
> The pointer is updated to the end of the buffer. If you want
> to get access to the content, subtract the result of the put,
> if you want to access the whole element, make a pointer before
> calling put.  
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
> 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to