Add secure libcurl transfer backend

This commit is contained in:
Mario Fetka
2026-07-14 17:01:03 +02:00
parent f3e6580ce5
commit 4a80e32f3e
19 changed files with 361 additions and 88 deletions
+7 -8
View File
@@ -121,9 +121,9 @@ urlinfo *prepare_lycos_url(ftps_request_t * request, char *ftps_loc,
(char *)kmalloc(lycos_url_len + strlen(request->file_name) + 300);
sprintf(lycos_url_buf,
"%s?form=advanced&query=%s&doit=Search&type=Exact+search&hits=%d&matches=&hitsprmatch=&limdom=&limpath=&limsize1=%zd&limsize2=%zd&f1=Host&f2=Path&f3=Size&f4=-&f5=-&f6=-&header=none&sort=none&trlen=20",
"%s?form=advanced&query=%s&doit=Search&type=Exact+search&hits=%d&matches=&hitsprmatch=&limdom=&limpath=&limsize1=%jd&limsize2=%jd&f1=Host&f2=Path&f3=Size&f4=-&f5=-&f6=-&header=none&sort=none&trlen=20",
ftps_loc, request->file_name, num_req_mirrors,
request->file_size, request->file_size);
(intmax_t) request->file_size, (intmax_t) request->file_size);
/* Debugging purposes */
/*sprintf(lycos_url_buf,"localhost/search.html"); */
@@ -161,9 +161,9 @@ urlinfo *prepare_filesearching_url(ftps_request_t * request, char *ftps_loc,
(char *)kmalloc(filesearching_url_len + strlen(request->file_name) + 300);
sprintf(filesearching_url_buf,
"%s?q=%s&l=en&t=f&e=on&m=%d&o=n&s=on&s1=%zd&s2=%zd&d=&p=&p2=&x=10&y=14",
"%s?q=%s&l=en&t=f&e=on&m=%d&o=n&s=on&s1=%jd&s2=%jd&d=&p=&p2=&x=10&y=14",
ftps_loc, request->file_name, num_req_mirrors,
request->file_size, request->file_size);
(intmax_t) request->file_size, (intmax_t) request->file_size);
/* Debugging purposes */
/* sprintf(filesearching_url_buf,"localhost/fs.html"); */
@@ -287,7 +287,7 @@ uerr_t parse_lycos_html_mirror_list(ftps_request_t * request, char *p)
strncpy(p1, i + 5, j - i - 5);
p1[j - i - 5 + 1] = 0;
proz_debug("\nstring len= %ld", strlen(p1));
proz_debug("\nstring len= %zu", strlen(p1));
p2 = p1;
@@ -464,7 +464,7 @@ uerr_t parse_filesearching_html_mirror_list(ftps_request_t * request, char *p)
p1 = kmalloc((j - i - 16) + 100);
strncpy(p1, i + 16, j - i - 16);
proz_debug("\nstring len= %ld", strlen(p1));
proz_debug("\nstring len= %zu", strlen(p1));
proz_debug("\nstring value= %s", p1);
p1[j - i - 16 + 1] = 0;
@@ -640,8 +640,7 @@ uerr_t get_mirror_info(connection_t * connection, char **ret_buf)
{
/* Construct the necessary header. */
www_auth = get_basic_auth_str(user, passwd, "Authorization");
proz_debug(_("Authenticating as user %s password %s"), user, passwd);
proz_debug(_("Authentification string=%s"), www_auth);
proz_debug(_("Authenticating as user %s"), user);
}
else
www_auth = 0;