eldap compatibility with Unicode strings

Guilherme Andrade g@REDACTED
Wed Apr 7 14:26:28 CEST 2021


Can eldap handle Unicode strings (e.g. passwords) in general?

I'm not in a position to test it myself as of this moment, and so I looked
into the source code.

- the eldap docs say the API mostly receives the built-in `string()` type
as input(s)[1]
- the `string()` type is defined as being a list of `char()`, which in
return is defined as a Unicode codepoint[2]
- eldap uses a module named ELDAPv3 to encode LDAP messages[3]
- ELDAPv3 appears to be generated from an ASN.1-defined protocol[4]
- under said protocol, most messages appear to transport "OCTET STRING"s[5]
- there's also an LDAPString[6] type, which is nevertheless also defined as
- finally, there's a separate notion of character strings under the docs
for the asn1 app[8], which is not used in eldap

With all of this in mind: would eldap handle Unicode strings? Or would I
have to convert them to UTF-8 encoded byte lists first?

(The later notion not being ideal, since they would be neither Unicode
strings nor UTF-8 binaries, but something in-between which is unsupported,
I presume, by both the `string` and `unicode` modules.)

[1]: http://erlang.org/doc/man/eldap.html#simple_bind-3
[7]: Expected to be encoded in UTF-8 no less

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210407/5a1110e2/attachment.htm>

More information about the erlang-questions mailing list