- 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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user