Opened 11 years ago

Closed 7 years ago

#8452 closed Patch (outdated)

add digest support for http proxy

Reported by: Tommy Wu Owned by:
Priority: normal Component: FileZilla Client
Keywords: Cc:
Component version: Operating system type:
Operating system version:

Description

this patch will add digest method support for http proxy

Attachments (5)

filezilla_3.6.0_http_proxy_digest.patch (13.5 KB ) - added by Tommy Wu 11 years ago.
add digest support for http proxy
filezilla_3.6.0_http_proxy_digest_with_md5.patch (22.2 KB ) - added by Tommy Wu 11 years ago.
add digest support for http proxy (with internal md5 function)
filezilla_3.7.3_http_proxy_digest.patch (22.6 KB ) - added by Tommy Wu 10 years ago.
try digest first, if fail, try basic again
filezilla_3.9.0.6_http_proxy_digest.patch (13.8 KB ) - added by Tommy Wu 9 years ago.
patch for 3.9.0.6, use md5 related function from nettle
nettle_check.patch (961 bytes ) - added by Tommy Wu 9 years ago.
check nettle/md5.h, md5_init(), md5_update(), md5_digest() in configure

Download all attachments as: .zip

Change History (10)

by Tommy Wu, 11 years ago

add digest support for http proxy

comment:1 by Tim Kosse, 11 years ago

Status: newmoreinfo

#include <nettle/md5-compat.h>

You need to add a configure check for Nettle and also explicitly link against nettle.

by Tommy Wu, 11 years ago

add digest support for http proxy (with internal md5 function)

in reply to:  1 comment:2 by Tommy Wu, 11 years ago

Status: moreinfonew

Replying to codesquid:

#include <nettle/md5-compat.h>

You need to add a configure check for Nettle and also explicitly link against nettle.

please try this version, it include a internal md5 function, so we don't need md5 lib from nettle or openssl.

by Tommy Wu, 10 years ago

try digest first, if fail, try basic again

by Tommy Wu, 9 years ago

patch for 3.9.0.6, use md5 related function from nettle

comment:3 by Tommy Wu, 9 years ago

I just update the patch for 3.9.0.6.
Do we still need to check the nettle in configure? Because based on the filezilla compile documentation, it should build nettle first, then build gnutls based on nettle. so it should already have nettle.

by Tommy Wu, 9 years ago

Attachment: nettle_check.patch added

check nettle/md5.h, md5_init(), md5_update(), md5_digest() in configure

comment:4 by Tim Kosse, 9 years ago

Status: newmoreinfo

Thanks for the update. A couple of comments:

1) I wonder whether we even need nettle. There already is a MD5 implementation in the source, though only in the fzsftp component: src/putty/sshmd5.c
Adopting it for use in the proxy code should be fairly straightforward, as is done similarly in the auto-updater with sshsh512.c

2) There's heap corruption wrt. pBody, in at least one place you're deleting the buffer without breaking the loop. Consider using std::unique_ptr instead of doing manual memory management.

3) There's a lot of code duplication with building the header, sending it, then receiving and parsing the response. Moving the common parts into separate functions would simplify the code a lot.

4) In wx3, wxString::Format is actually a type-safe template function as opposed to the C-style variadic function used in wx2.8 and earlier. Passing wxString arguments using c_str() is no longer needed, it only reduces performance.

5) Functions like wxString::Lower are locale-aware. Converting a string containing the uppercase letter I and then comparing against a string containing the letter i will fail if the locale is set to Turkish. See http://en.wikipedia.org/wiki/Dotted_and_dotless_I for details. Use MakeLowerAscii from src/include/misc.h

6) wxString has a default constructor, there's no need to construct it from an empty string literal.

7) Instead of comparing against the empty string literal, use wxString::empty()

comment:5 by Kurt McKee, 7 years ago

Resolution: outdated
Status: moreinfoclosed
Note: See TracTickets for help on using tickets.