Encoding rasn-ldap::UnbindRequest into the ber format results in [0x62, 0], but the correct encoding should be [0x42, 0]. This also leads to decoding failures of correctly encoded messages.
The difference is in the 5th bit in tag (primitive/constructed). Since UnbindRequest request is a struct, it gets encoded as a sequence, with the bit set to 1 (constructed). Correctly it should be set to primitive, as it's just NULL with tag (https://datatracker.ietf.org/doc/html/rfc4511#section-4.3).
I've checked the encoding against libldap based tools (e.g. ldapsearch).
Encoding
rasn-ldap::UnbindRequest
into theber
format results in[0x62, 0]
, but the correct encoding should be[0x42, 0]
. This also leads to decoding failures of correctly encoded messages.The difference is in the 5th bit in tag (primitive/constructed). Since
UnbindRequest
request is a struct, it gets encoded as a sequence, with the bit set to 1 (constructed). Correctly it should be set to primitive, as it's just NULL with tag (https://datatracker.ietf.org/doc/html/rfc4511#section-4.3).I've checked the encoding against libldap based tools (e.g. ldapsearch).