[Date Prev][Date Next] [Chronological] [Thread] [Top]

Null strings and Boolean in LDAP



Hi Mark!

This note is a follow-up to Ella Gardner's question about null strings and
raises an additional question on the boolean syntax.  

If I understand your answer to Ella, the BNF definition of printablestring
(printablestring = 1*p) in RFC 2252 is only part of the metalanguage for
LDAP.  It does not apply to the values described for the syntaxes that
include ASN.1-Printable Strings.  

I am also a little confused about when to type a string as printable
instead of OCTET STRING.  Since the LDAP-Printable String syntax
description does not specify encoding as an OCTET STRING, I take it that
the attribute value is typed as ASN.1-Printable String.  This is different
from the LDAP-Directory String syntax where the type is OCTET STRING
because the UTF-8 encoding does not have its own type code in BER.

Both of these issues are illustrated in the case below on the serialNumber
attribute.

On the Boolean syntax, is the character string for the value encoded as an
OCTET STRING?  This is shown in the dualRoute attribute case below. 

Thanks,
Kathy Dally


1.  serialNumber Attribute Instance Encoding

The definition of the serialNumber attribute is given in RFC 2256.

In this case, the serialNumber attribute has three values:

	{ '73 65 72 69 61 6C 4E 75 6B 62 65 72'H , { "1234", "", "5678" }} 

LDAP protocol encoding:

	30 1E 04 0C 73 65 72 69 61 6C 4E 75 6B 62 65 72 31 0E 13 04 31 32 33 
	34 13 00 13 04 35 36 37 38


2.  dualRoute Attribute Instance Encoding

This is the definition of the dualRoute attribute:

	( 2.16.840.1.101.2.2.1.54 NAME 'dualRoute' 
		EQUALITY 2.5.13.13  ; booleanMatch
		SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 
		SINGLE-VALUE )

In this case, the dualRoute attribute has the value "TRUE":

	{ '64 75 61 6C 52 6F 75 74 6E'H, { '54 52 55 45'H }

LDAP protocol encoding:

	30 13 04 09 64 75 61 6C 52 6F 75 74 6E 31 06 04 04 54 52 55 45



Kathy Dally						tel: 703-883-6058
The MITRE Corp.					fax: 703-883-7142
1820 Dolley Madison Blvd.				kdally@mitre.org
McLean, VA 22102