Ulf Moeller wrote:
> 
> On Tue, Nov 14, 2000, [EMAIL PROTECTED] wrote:
> 
> >   +The BOOLEAN type now takes three values.
> 
> Yeah, *that* is progress!
> 

Yes it reminded me of Eric's old signature about a tristate boolean in
Windoze.

Well strictly speaking two values are for DER and the other is only used
for OPTIONAL or DEFAULT. It can take more than that for BER because
anything non zero represents TRUE and so it takes account of that so the
encoded data looks like the decoded stuff.

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

I've been wondering whether to fix this by having BOOLEAN as either "int
*" or "unsigned char *" then it can follow the same rules as everything
else.

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]

Reply via email to