bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Fail


From: Tim Rühsen
Subject: Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures.
Date: Tue, 16 Jul 2013 22:47:50 +0200
User-agent: KMail/4.10.5 (Linux/3.9-1-amd64; KDE/4.10.5; x86_64; ; )

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

[Prev in Thread] Current Thread [Next in Thread]