From: simon.richter@hogyros.de Date: Fri, 13 May 2022 07:04:14 GMT Subject: [PATCH 1/3] Rename proxy_authmethods -> authmethods Message-ID: <20220513070416.37235-2-Simon.Richter@hogyros.de> In-Reply-To: <20220513070416.37235-1-Simon.Richter@hogyros.de> From: Simon Richter Curl also allows specifying a list of acceptable auth methods for the request itself, so this isn't specific to proxy authentication. Signed-off-by: Simon Richter --- http.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/http.c b/http.c index 229da4d148..318dc5daea 100644 --- a/http.c +++ b/http.c @@ -79,7 +79,7 @@ static int proxy_ssl_cert_password_required; static struct { const char *name; long curlauth_param; -} proxy_authmethods[] = { +} authmethods[] = { { "basic", CURLAUTH_BASIC }, { "digest", CURLAUTH_DIGEST }, { "negotiate", CURLAUTH_GSSNEGOTIATE }, @@ -470,14 +470,14 @@ static void init_curl_proxy_auth(CURL *result) if (http_proxy_authmethod) { int i; - for (i = 0; i < ARRAY_SIZE(proxy_authmethods); i++) { - if (!strcmp(http_proxy_authmethod, proxy_authmethods[i].name)) { + for (i = 0; i < ARRAY_SIZE(authmethods); i++) { + if (!strcmp(http_proxy_authmethod, authmethods[i].name)) { curl_easy_setopt(result, CURLOPT_PROXYAUTH, - proxy_authmethods[i].curlauth_param); + authmethods[i].curlauth_param); break; } } - if (i == ARRAY_SIZE(proxy_authmethods)) { + if (i == ARRAY_SIZE(authmethods)) { warning("unsupported proxy authentication method %s: using anyauth", http_proxy_authmethod); curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY); -- 2.30.2