aboutsummaryrefslogtreecommitdiff
path: root/lib/ldap.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-10-15 21:43:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-10-15 21:43:48 +0000
commita579d6706436615845f57692921e0891fb6e3719 (patch)
tree936f3c7c41195e63bfd13c2f2b0151e1db1db397 /lib/ldap.c
parentbe760bed7e544136eaa175f0fe58251da1ff6e41 (diff)
- Pascal Terjan filed bug #2154627
(http://curl.haxx.se/bug/view.cgi?id=2154627) which pointed out that libcurl uses strcasecmp() in multiple places where it causes failures when the Turkish locale is used. This is because 'i' and 'I' isn't the same letter so strcasecmp() on those letters are different in Turkish than in English (or just about all other languages). I thus introduced a totally new internal function in libcurl (called Curl_ascii_equal) for doing case insentive comparisons for english-(ascii?) style strings that thus will make "file" and "FILE" match even if the Turkish locale is selected.
Diffstat (limited to 'lib/ldap.c')
-rw-r--r--lib/ldap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ldap.c b/lib/ldap.c
index 816b46faf..917269171 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -198,7 +198,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
}
/* Get the URL scheme ( either ldap or ldaps ) */
- if(strequal(conn->protostr, "LDAPS"))
+ if(Curl_ascii_equal(conn->protostr, "LDAPS"))
ldap_ssl = 1;
infof(data, "LDAP local: trying to establish %s connection\n",
ldap_ssl ? "encrypted" : "cleartext");
@@ -228,7 +228,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
/* Novell SDK supports DER or BASE64 files. */
int cert_type = LDAPSSL_CERT_FILETYPE_B64;
if((data->set.str[STRING_CERT_TYPE]) &&
- (strequal(data->set.str[STRING_CERT_TYPE], "DER")))
+ (Curl_ascii_equal(data->set.str[STRING_CERT_TYPE], "DER")))
cert_type = LDAPSSL_CERT_FILETYPE_DER;
if(!ldap_ca) {
failf(data, "LDAP local: ERROR %s CA cert not set!",
@@ -269,7 +269,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
if(data->set.ssl.verifypeer) {
/* OpenLDAP SDK supports BASE64 files. */
if((data->set.str[STRING_CERT_TYPE]) &&
- (!strequal(data->set.str[STRING_CERT_TYPE], "PEM"))) {
+ (!Curl_ascii_equal(data->set.str[STRING_CERT_TYPE], "PEM"))) {
failf(data, "LDAP local: ERROR OpenLDAP does only support PEM cert-type!");
status = CURLE_SSL_CERTPROBLEM;
goto quit;