From 74fe1b95fb44053fdbef4b1eb9f550a3da332eda Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 23 Oct 2012 23:12:58 +0200 Subject: [PATCH] tlsauthtype: deal with the string case insensitively When given a string as 'srp' it didn't work, but required 'SRP'. Starting now, the check disregards casing. Bug: http://curl.haxx.se/bug/view.cgi?id=3578418 Reported by: Jeff Connelly --- lib/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index 8bbd3e478..b30a4fa51 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2589,7 +2589,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ break; case CURLOPT_TLSAUTH_TYPE: - if(strncmp((char *)va_arg(param, char *), "SRP", strlen("SRP")) == 0) + if(strnequal((char *)va_arg(param, char *), "SRP", strlen("SRP"))) data->set.ssl.authtype = CURL_TLSAUTH_SRP; else data->set.ssl.authtype = CURL_TLSAUTH_NONE;