[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keytab - MIT Keytab Binary File Format Encoder / Decoder




Michael B Allen <mba2000@ioplex.com> writes:

>> Michael B Allen <mba2000@ioplex.com> writes:
>> 
>> > 2) What codeset are strings? Are they UTF-8 or locale dependant?
>> 
>> "kerberos codeset", today, basicly ascii.
>
> Good. Than it won't hurt to call it UTF-8 :->

Its not utf8.

>> > 3) Are my assumptions about num_components correct: 1 for no service,
>> >    2 with service?
>> 
>> See code in Heimdal, depends on version. Hint, there is no such thing as
>> "name" and "service" in kerberos5, its just a list of
>> components. foo/bar/baz/kaka/cookie@EXAMPLE.ORG is a valid name.
>
> Ahh, I see. Is the realm always present?

Yes.

> So it's:
>
>   struct keytab_entry {
>       int32_t size;
        struct keytab_principal {

nametype is first, and not present in version 1.

	>       uint32_t name_type;

num_components is one too many in version 1.

	>       uint16_t num_components;
	>       counted_octet_string realm;
	>       counted_octet_string components[num_components];
	}
>       uint32_t timestamp;
>       uint8_t vno8;
>       keyblock key;

vno optional field

>       uint32_t vno;
>   };
>
>   counted_octet_string {

The "principal" part uses int32 lengths for the strings (int16 for
num_components) while the keyblock uses int16 lengths.

>       uint16_t length; 
>       uint8_t data[length];
>   };

Love

PGP signature