Lines Matching refs:data
125 static int _ldap_url_parse(struct Curl_easy *data,
160 static CURLcode ldap_do(struct Curl_easy *data, bool *done);
268 static int ldap_win_bind(struct Curl_easy *data, LDAP *server,
276 if(user && passwd && (data->set.httpauth & CURLAUTH_BASIC)) {
287 rc = ldap_win_bind_auth(server, user, passwd, data->set.httpauth);
302 static CURLcode ldap_do(struct Curl_easy *data, bool *done)
311 struct connectdata *conn = data->conn;
328 infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d",
330 infof(data, "LDAP local: %s", data->state.url);
333 rc = ldap_url_parse(data->state.url, &ludp);
335 rc = _ldap_url_parse(data, conn, &ludp);
338 failf(data, "Bad LDAP URL: %s", ldap_err2string(rc));
346 infof(data, "LDAP local: trying to establish %s connection",
360 if(data->state.aptr.user) {
382 failf(data, "LDAP local: ldapssl_client_init %s", ldap_err2string(rc));
389 if((data->set.ssl.cert_type) &&
390 (strcasecompare(data->set.ssl.cert_type, "DER")))
393 failf(data, "LDAP local: ERROR %s CA cert not set",
398 infof(data, "LDAP local: using %s CA cert '%s'",
403 failf(data, "LDAP local: ERROR setting %s CA cert: %s",
415 failf(data, "LDAP local: ERROR setting cert verify mode: %s",
422 failf(data, "LDAP local: Cannot connect to %s:%u",
430 if((data->set.ssl.cert_type) &&
431 (!strcasecompare(data->set.ssl.cert_type, "PEM"))) {
432 failf(data, "LDAP local: ERROR OpenLDAP only supports PEM cert-type");
437 failf(data, "LDAP local: ERROR PEM CA cert not set");
441 infof(data, "LDAP local: using PEM CA cert: %s", ldap_ca);
444 failf(data, "LDAP local: ERROR setting PEM CA cert: %s",
456 failf(data, "LDAP local: ERROR setting cert verify mode: %s",
463 failf(data, "LDAP local: Cannot connect to %s:%u",
471 failf(data, "LDAP local: ERROR setting SSL/TLS mode: %s",
479 failf(data, "LDAP local: ERROR starting SSL/TLS mode: %s",
488 failf(data, "LDAP local: SSL/TLS not supported with this version "
496 else if(data->set.use_ssl > CURLUSESSL_TRY) {
497 failf(data, "LDAP local: explicit TLS not supported");
504 failf(data, "LDAP local: Cannot connect to %s:%u",
512 rc = ldap_win_bind(data, server, user, passwd);
520 rc = ldap_win_bind(data, server, user, passwd);
527 failf(data, "LDAP local: bind via ldap_win_bind %s",
530 failf(data, "LDAP local: bind via ldap_simple_bind_s %s",
537 Curl_pgrsSetDownloadCounter(data, 0);
542 failf(data, "LDAP remote: %s", ldap_err2string(rc));
577 result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"DN: ", 4);
584 result = Curl_client_write(data, CLIENTWRITE_BODY, name, name_len);
591 result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
627 result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\t", 1);
638 result = Curl_client_write(data, CLIENTWRITE_BODY, attr, attr_len);
649 result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)": ", 2);
676 result = Curl_client_write(data, CLIENTWRITE_BODY, val_b64,
691 result = Curl_client_write(data, CLIENTWRITE_BODY, vals[i]->bv_val,
704 result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
724 result = Curl_client_write(data, CLIENTWRITE_BODY, (char *)"\n", 1);
739 infof(data, "There are more than %d entries", num);
751 /* no data to transfer */
752 Curl_setup_transfer(data, -1, -1, FALSE, -1);
836 * extract the rest from 'data->state.path+1'. All fields are optional.
843 static int _ldap_url_parse2(struct Curl_easy *data,
853 if(!data ||
854 !data->state.up.path ||
855 data->state.up.path[0] != '/' ||
856 !strncasecompare("LDAP", data->state.up.scheme, 4))
864 p = path = strdup(data->state.up.path + 1);
869 if(data->state.up.query) {
870 q = query = strdup(data->state.up.query);
1059 static int _ldap_url_parse(struct Curl_easy *data,
1070 rc = _ldap_url_parse2(data, conn, ludp);