summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/ldap.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-07 16:41:57 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-07 16:41:57 (GMT)
commit697e8871a1d1cf56f01866c082235ea20bd1057f (patch)
treeb0fe132b726b5dcce50eac5b2de3ac7456df3d18 /Utilities/cmcurl/lib/ldap.c
parentbdb3a8203e1a1207e7a89dca1b3e6a569a732b10 (diff)
parenta1f6ec647cfab8d613897562f8ee5f81a8f6b68d (diff)
downloadCMake-697e8871a1d1cf56f01866c082235ea20bd1057f.zip
CMake-697e8871a1d1cf56f01866c082235ea20bd1057f.tar.gz
CMake-697e8871a1d1cf56f01866c082235ea20bd1057f.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2022-01-05 (801bd513)
Diffstat (limited to 'Utilities/cmcurl/lib/ldap.c')
-rw-r--r--Utilities/cmcurl/lib/ldap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Utilities/cmcurl/lib/ldap.c b/Utilities/cmcurl/lib/ldap.c
index 1d9e44c..3154db5 100644
--- a/Utilities/cmcurl/lib/ldap.c
+++ b/Utilities/cmcurl/lib/ldap.c
@@ -464,6 +464,11 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
#endif
#endif /* CURL_LDAP_USE_SSL */
}
+ else if(data->set.use_ssl > CURLUSESSL_TRY) {
+ failf(data, "LDAP local: explicit TLS not supported");
+ result = CURLE_NOT_BUILT_IN;
+ goto quit;
+ }
else {
server = ldap_init(host, (int)conn->port);
if(!server) {
@@ -590,7 +595,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
attr_len = strlen(attr);
vals = ldap_get_values_len(server, entryIterator, attribute);
- if(vals != NULL) {
+ if(vals) {
for(i = 0; (vals[i] != NULL); i++) {
result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\t", 1);
if(result) {