[Freeipa-devel] Re: Encoding of Kerberos principal

Don Davis dodavis at redhat.com
Tue Jul 7 14:08:37 UTC 2009


>
> Is it safe to assume that the principal is UTF-8 encoded
> (as far as the MIT Kerberos library is concerned)?
>    

hi, jason --

     the short answer is "no;"  in general, principal names
are claimed to be encoding-agnostic, meaning that they're
not null-terminated, and the code is supposed to ignore the
bytes' internal structure;  a principal-name is just void*+length,
more-or-less.

     the long answer is complex, and i can't represent it
faithfully.  there are places in the code that know about
ucs2le (a predecessor to utf-16), and there are Windows-
specific places in the code that know about utf-16 strings
per se.  also, kerberos handles internationalization of
passwords, principal-names, and realm-names all
differently.   it's pretty much what you'd expect for
legacy code that predates the internationalization effort.

     if, as i expect, you have a more-detailed version of
your question, i'll try to help.

                                                                 - don





-




More information about the Freeipa-devel mailing list