Skip to content

Commit

Permalink
setopt: fix check for CURLOPT_PROXY_TLSAUTH_TYPE value
Browse files Browse the repository at this point in the history
Prior to this change CURLOPT_PROXY_TLSAUTH_TYPE would return
CURLE_BAD_FUNCTION_ARGUMENT on any type other than NULL. Since there is
only one type of TLS auth and it is also the default (SRP) the TLS auth
would work anyway.

Closes #12981
  • Loading branch information
swt2c authored and jay committed Feb 24, 2024
1 parent e3a3bb3 commit 7448054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/setopt.c
Expand Up @@ -2864,13 +2864,13 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
#endif
case CURLOPT_TLSAUTH_TYPE:
argptr = va_arg(param, char *);
if(argptr && !strncasecompare(argptr, "SRP", strlen("SRP")))
if(argptr && !strcasecompare(argptr, "SRP"))
return CURLE_BAD_FUNCTION_ARGUMENT;
break;
#ifndef CURL_DISABLE_PROXY
case CURLOPT_PROXY_TLSAUTH_TYPE:
argptr = va_arg(param, char *);
if(argptr || !strncasecompare(argptr, "SRP", strlen("SRP")))
if(argptr && !strcasecompare(argptr, "SRP"))
return CURLE_BAD_FUNCTION_ARGUMENT;
break;
#endif
Expand Down

0 comments on commit 7448054

Please sign in to comment.