curl-library
RE: [PATCH] Added AUTH NTLM for SMTP
Date: Mon, 8 Aug 2011 14:25:00 +0100
Hi,
On Mon, 8 Aug 2011, Yang Tse wrote:
> In order to properly integrate all this with existing code I would
appreciate if we did all this actually in three different steps.
>
> 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.
> 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().
> 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.
Do you want me to start producing a patch for part one or are you able to
push the modified curl.h, urldata.h and url.c into the repository whilst I
rework smtp.c to remove the ntlm code?
In the meantime any more thoughts / clarification about part two would be
appreciated as I'm not sure of the best approach to take here.
Kind Regards
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-08