Am Dienstag, 16. Juli 2013, 20:52:01 schrieb Darshit Shah:

> There are two regions that I would like to draw attention to:
> 1. http.c:3752 : The code is quite redundant and I would prefer that it was 
> somehow merged. Ideas on fixing this would be greatly appreciated! 

I guess you are talking about calculating 'hash' two times when algorithm=md5-
sess.

That is indeed unneeded. It should be like:

    if (algorithm && !strcmp (algorithm, "MD5-sess"))
      {
        /* A1BUF = H( H(user ":" realm ":" password) ":" nonce ":" cnonce ) */
        ... calc hash
       }
    else
       {
         /* A1BUF = H(user ":" realm ":" password) */
         ... calc hash
       }

    dump_hash (a1buf, hash);

Fix it, test it and if it's good, submit a patch ;-)

Regards, Tim

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to