Oh, ok.
I was also thinking about switching from Class to Enum for those types.
FYI, I have started to write some encoders for simple Kerberos
constructs (like PrincipalName, EncryptionKey,etc) and it works pretty
well. The idea is to extend the existing classes by adding a couple of
methods, so that you ask them to 'encode' themselves :
PrincipalName principal = new PrincipalName(
PrincipalNameType.KRB_NT_PRINCIPAL, "Test" );
ByteBuffer encoded = ByteBuffer.allocate(
principal.computeLength() );
principal.encode( encoded );
The ByteBuffer now contains the encoded PrincipalName. For such an
object, the gain is impressive : it encodes around 6 times faster. The
good point is that it's not intrusive (the old encoding is still
working, otherwise I wouldn't be able to compare the results)
I also started to add some Unit tests for each class I extended, with
specific tests (like a Principal name with a NULL name)
Work in progress, and it will take time...
On 6/27/07, Enrique Rodriguez <[EMAIL PROTECTED]> wrote:
On 6/26/07, Emmanuel Lecharny <[EMAIL PROTECTED]> wrote:
> ...
> while looking at the HostAddressType class (in kerberos-shared
> project), I found values for address types which are not the same than
> the ones given in RFC 1510 or 4120. Is there a reason, or is it just a
> copy from the<sys/socket.h> values ?
Yes, socket.h.
> For instance, we don't support NetBios and IPV6 address types while it
> is described into the RFCs (code 16 and 20), and there are some
> address types which are listed in the source and not in the RFCs.
And some of the numbers are just wrong, most importantly the one for
IPv6. I recommend trimming/updating it to just the values from RFC
4120.
Enrique
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com