From: Michael Tremer Date: Thu, 26 Jun 2025 17:55:56 +0000 (+0000) Subject: xfer: Remove the unused authentication function X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e5b1ac23429e03259d16d2138491f8309e2fd67;p=pakfire.git xfer: Remove the unused authentication function Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/xfer.c b/src/pakfire/xfer.c index 9ea92977..9419062f 100644 --- a/src/pakfire/xfer.c +++ b/src/pakfire/xfer.c @@ -98,9 +98,6 @@ struct pakfire_xfer { // Effective URL const char* effective_url; - // Authentication - unsigned int auth; - // Space for cURL error message char error[CURL_ERROR_SIZE]; @@ -826,13 +823,6 @@ int pakfire_xfer_set_output_path(struct pakfire_xfer* xfer, const char* path) { return 0; } -int pakfire_xfer_auth(struct pakfire_xfer* xfer) { - // Enable authentication - xfer->auth = 1; - - return 0; -} - /* This function translates any cURL error codes into xfer codes */ @@ -1708,23 +1698,6 @@ int pakfire_xfer_prepare(struct pakfire_xfer* xfer, struct pakfire_progress* pro } } - // Authentication - if (xfer->auth) { - // Request SPNEGO - r = curl_easy_setopt(xfer->handle, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE); - if (r) { - ERROR(xfer->ctx, "Could not enable SPNEGO\n"); - return r; - } - - // Set an empty username - r = curl_easy_setopt(xfer->handle, CURLOPT_USERPWD, ":"); - if (r) { - ERROR(xfer->ctx, "Could not set username\n"); - return r; - } - } - // Setup progress r = pakfire_xfer_prepare_progress(xfer, progress, flags); if (r) diff --git a/src/pakfire/xfer.h b/src/pakfire/xfer.h index 7cfd136e..06d3460d 100644 --- a/src/pakfire/xfer.h +++ b/src/pakfire/xfer.h @@ -136,9 +136,6 @@ int pakfire_xfer_set_response_callback(struct pakfire_xfer* xfer, // Input int pakfire_xfer_set_input(struct pakfire_xfer* xfer, FILE* f); -// Authentication -int pakfire_xfer_auth(struct pakfire_xfer* xfer); - int pakfire_xfer_prepare(struct pakfire_xfer* xfer, struct pakfire_progress* progress, int flags); pakfire_xfer_error_code_t pakfire_xfer_done(struct pakfire_xfer* xfer, sd_event* loop, int code);