Frank Balluffi wrote:
>
> Steve Henson said:
>
> > BOOLEAN is an evil thing for the ASN1 code. Its declared as an 'int'.
> > Every other type is declared as a pointer which is allocated as
> > required: if it is NULL then the field is omitted (I'll be adding a
> > check to see if thats allowed at some point: i.e. only if the type is
> > OPTIONAL, DEFAULT). This means that the handling has lots of
> > cases where
> > you have "do this for BOOLEAN" and "do this for everything else".
>
> Would it be possible to define a version number for the DER encoder/decoder
> such that existing code can continue to represent a BOOLEAN as an int and
> next version code can represent a BOOLEAN as an unsigned char *?
>
I'll probably stick with an int and expand the code to cope with it more
cleanly. Now I think about it I'm a bit reluctant to have a char * which
gets allocated with a single byte for BOOLEAN types.
The new code should allow alternative representations of standard types.
This means that if, for example you want to represent an ASN1_INTEGER as
an int or a BIGNUM then you can do so.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]