aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2007-08-16 14:08:47 +0000
committerGunter Knauf <gk@gknw.de>2007-08-16 14:08:47 +0000
commitccba0d10b6baf5c73cae8cf4fb3f29f0f55c5a34 (patch)
treedf7b5208ce1569e47128ceda70984e714e2a4208 /lib/url.c
parent7f7e42732d813ffccc7a33267b46a2e445069fef (diff)
added basic ldaps support; for now its ifdef'd with HAVE_LDAP_SSL unless we know its fully working, and available with all LDAP SDKs.
Win32 requires to have the trusted CA in local keystore - I've not found yet a way to disable the cert check.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 7699e38d2..ca7f51431 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3062,6 +3062,23 @@ static CURLcode setup_connection_internals(struct SessionHandle *data,
#endif
}
+#ifdef HAVE_LDAP_SSL
+ else if (strequal(conn->protostr, "LDAPS")) {
+#ifndef CURL_DISABLE_LDAP
+ conn->protocol |= PROT_LDAP|PROT_SSL;
+ conn->port = PORT_LDAPS;
+ conn->remote_port = PORT_LDAPS;
+ conn->curl_do = Curl_ldap;
+ /* no LDAP-specific done */
+ conn->curl_done = (Curl_done_func)ZERO_NULL;
+#else
+ failf(data, LIBCURL_NAME
+ " was built with LDAP disabled!");
+ return CURLE_UNSUPPORTED_PROTOCOL;
+#endif
+ }
+#endif /* CURL_LDAP_USE_SSL */
+
else if (strequal(conn->protostr, "FILE")) {
#ifndef CURL_DISABLE_FILE
conn->protocol |= PROT_FILE;