]> git.ipfire.org Git - pakfire.git/commitdiff
xfer: Remove the unused authentication function
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Jun 2025 17:55:56 +0000 (17:55 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Jun 2025 17:55:56 +0000 (17:55 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/xfer.c
src/pakfire/xfer.h

index 9ea92977bbd44d117df57afe35aa26370b6d3f42..9419062f81a349bae4cc3766ef025b1362d3cf0e 100644 (file)
@@ -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)
index 7cfd136e962498be3af3cc68746453fcb37bedac..06d3460df814bd17815496542aea7aef41ba591e 100644 (file)
@@ -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);