PROT_LDAP /* protocol */
};
+#ifdef USE_SSL
/*
* LDAPS protocol handler.
*/
PORT_LDAPS, /* defport */
PROT_LDAP | PROT_SSL /* protocol */
};
+#endif
static const char *url_errs[] = {
"success",
return CURLE_OK;
}
+#ifdef USE_SSL
static Sockbuf_IO ldapsb_tls;
+#endif
static CURLcode ldap_connect(struct connectdata *conn, bool *done)
{
ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
+#ifdef USE_SSL
if (conn->protocol & PROT_SSL) {
CURLcode res;
if (data->state.used_interface == Curl_if_easy) {
return res;
}
}
+#endif
if (data->state.used_interface == Curl_if_easy)
return ldap_connecting(conn, done);
int rc, err;
char *info = NULL;
+#ifdef USE_SSL
if (conn->protocol & PROT_SSL) {
/* Is the SSL handshake complete yet? */
if (!li->ssldone) {
li->send = conn->send[FIRSTSOCKET];
}
}
+#endif
if (data->state.used_interface == Curl_if_easy)
tvp = NULL; /* let ldap_result block indefinitely */
return ret;
}
+#ifdef USE_SSL
static int
ldapsb_tls_setup(Sockbuf_IO_Desc *sbiod, void *arg)
{
ldapsb_tls_write,
ldapsb_tls_close
};
+#endif /* USE_SSL */
#endif /* USE_OPENLDAP */