Re: [NET] Telnet NTLM Authentication

2011-06-10 Thread sebb
On 10 June 2011 13:00, abhijeet gaikwad  wrote:
> Hi Team,
> I was able to extend commons-net Telnet API to support NTLM Authentication.
> I extended TelnetOptionHandler to create my own AuthTypeHandler for NTLM.
> For creating NTLM packets I used JCIFS API. The challenge NTLM message that
> I am recieving from the server is more than 256 bytes, but current
> commons-net API supports suboption message size upto 256 bytes only. There
> is a private integer array in TelnetInputStream named __suboption with size
> 256. If I increase the size, my authentication works perfect.
>
> My question is, is there any specific reason why the array size is 256. Can
> it be increased? If I make it 512, my code works. Please suggest me because
> if I increase the size, I am able to telnet via a linux machine with NTLM
> Authentication by just extending the Telnet client provided in commons-net
> API. Otherwise, I will have to reinvent the wheel again ... write a Telnet
> client of my own.

The size is probably set to 256 because that is large enough for
handling existing options.

It could be increased, but ideally this would be done in a compatible way.

Please register for JIRA and raise an enhancement request.
Patches can also be attached to the JIRA.

> Thanks,
> Abhijeet Gaikwad
>

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[NET] Telnet NTLM Authentication

2011-06-10 Thread abhijeet gaikwad
Hi Team,
I was able to extend commons-net Telnet API to support NTLM Authentication.
I extended TelnetOptionHandler to create my own AuthTypeHandler for NTLM.
For creating NTLM packets I used JCIFS API. The challenge NTLM message that
I am recieving from the server is more than 256 bytes, but current
commons-net API supports suboption message size upto 256 bytes only. There
is a private integer array in TelnetInputStream named __suboption with size
256. If I increase the size, my authentication works perfect.

My question is, is there any specific reason why the array size is 256. Can
it be increased? If I make it 512, my code works. Please suggest me because
if I increase the size, I am able to telnet via a linux machine with NTLM
Authentication by just extending the Telnet client provided in commons-net
API. Otherwise, I will have to reinvent the wheel again ... write a Telnet
client of my own.

Thanks,
Abhijeet Gaikwad