directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Re: Incompatible HostAddressType with RFCs
Date Wed, 27 Jun 2007 05:40:35 GMT
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 <enriquer9@gmail.com> wrote:
> On 6/26/07, Emmanuel Lecharny <elecharny@gmail.com> 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

Mime
View raw message