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

bitStringValidate does not comply with rfc2252 (ITS#1441)



Full_Name: Julius Enarusai
Version: HEAD
OS: Linux
URL: ftp://ftp.openldap.org/incoming/bit_string_patch.tar
Submission from: (NULL) (129.42.208.144)


According to section 6.3 of rfc2252, the syntax of Bit String is

bitstring = "'" *binary-digit "'B"
binary-digit = "0" / "1"

However, the current bitStringValidate function has it backwards. 
It is expecting the bv_val[0] to be 'B' and the last byte to be "\'".
This patch fixes the bitStringValidate function to comply with rfc2252.

In addition, there is no bitStringFilter, bitStringIndexer and 
bitStringNormalize function for the Bit String syntax. The patch also 
added code to re-use the octetStringFilter and octetStringIndexer 
functions and also provides a new bitStringNormalize function.