cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] Added AUTH NTLM for SMTP

From: Yang Tse <yangsita_at_gmail.com>
Date: Mon, 8 Aug 2011 17:00:07 +0200

2011/8/8 Steve Holme wrote:

>> First one, patch existing code with changes that you deem necessary.
>
> I guess this would involve the changes to curl.h, urldata.h and url.c for
> the new MAIL_AUTH and MAIL_SINGLE_AUTH options as well as the modifications
> in smtp.c to support these options.

No. With this I meant changes to http_ntlm.c and http_ntlm.h that your
patch seems to introduce, that I suppose you deem necessary for NTLM
correctness or convinience and that can be performed on existing code
without the need to moving it out of those two files.

The smtp and mail stuff would belong to the third step.

>> Second one, refactor existing code into whatever functions you believe are
> appropriate. It is important to not change code while refactoring it into
> functions.
>
> I would say this is quite difficult... Whilst most of the crypto functions
> moved from http_ntlm to curl_ntlm without any modification , the actual ntlm
> message functions were embedded in the contents of Curl_input_ntlm() and
> Curl_output_ntlm (). As such they had to be reworked quite a bit to turn
> them into the stand-alone functions: Curl_ntlm_create_type1_message(),
> Curl_ntlm_decode_type2_message() and Curl_ntlm_create_type3_message().

It is easy break this phase into two different patches, one the does
the refactoring without actually adding nor changing functionality,
and a second one that brings in the new stuff.

>> Third one, introduce the NTLM auth for SMTP support.
>
> This would be the new functions that I added to the smtp module:
> smtp_auth_ntlm(), smtp_state_auth_ntlm_resp() and
> smtp_state_auth_ntlm_type2_resp()  as well as the modifications to
> smtp_authenticate() and smtp_statemach_act () to support this.

Plus the stuff in curl.h, urldata.h and url.c

> Do you want me to start producing a patch for part one

Yes please taking in account what I've expressed here.

-- 
-=[Yang]=-
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-08