Lines Matching refs:li

289   struct ldapconninfo *li = conn->proto.ldapc;  in oldap_parse_login_options()  local
305 result = Curl_sasl_parse_url_auth_option(&li->sasl, value, ptr - value); in oldap_parse_login_options()
350 struct ldapconninfo *li = conn->proto.ldapc; in oldap_perform_auth() local
359 rc = ldap_sasl_bind(li->ld, NULL, mech, pcred, NULL, NULL, &li->msgid); in oldap_perform_auth()
372 struct ldapconninfo *li = conn->proto.ldapc; in oldap_continue_auth() local
381 rc = ldap_sasl_bind(li->ld, NULL, mech, pcred, NULL, NULL, &li->msgid); in oldap_continue_auth()
392 struct ldapconninfo *li = data->conn->proto.ldapc; in oldap_cancel_auth() local
393 int rc = ldap_sasl_bind(li->ld, NULL, LDAP_SASL_NULL, NULL, NULL, NULL, in oldap_cancel_auth()
394 &li->msgid); in oldap_cancel_auth()
406 struct ldapconninfo *li = conn->proto.ldapc; in oldap_perform_bind() local
420 rc = ldap_sasl_bind(li->ld, binddn, LDAP_SASL_SIMPLE, &passwd, in oldap_perform_bind()
421 NULL, NULL, &li->msgid); in oldap_perform_bind()
433 struct ldapconninfo *li = data->conn->proto.ldapc; in oldap_perform_mechs() local
440 rc = ldap_search_ext(li->ld, "", LDAP_SCOPE_BASE, "(objectclass=*)", in oldap_perform_mechs()
442 NULL, NULL, NULL, 0, &li->msgid); in oldap_perform_mechs()
453 struct ldapconninfo *li = data->conn->proto.ldapc; in oldap_perform_sasl() local
454 CURLcode result = Curl_sasl_start(&li->sasl, data, TRUE, &progress); in oldap_perform_sasl()
473 struct ldapconninfo *li = conn->proto.ldapc; in oldap_ssl_connect() local
483 ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb); in oldap_ssl_connect()
485 li->recv = conn->recv[FIRSTSOCKET]; in oldap_ssl_connect()
486 li->send = conn->send[FIRSTSOCKET]; in oldap_ssl_connect()
496 struct ldapconninfo *li = data->conn->proto.ldapc; in oldap_perform_starttls() local
497 int rc = ldap_start_tls(li->ld, NULL, NULL, &li->msgid); in oldap_perform_starttls()
509 struct ldapconninfo *li; in oldap_connect() local
520 li = calloc(1, sizeof(struct ldapconninfo)); in oldap_connect()
521 if(!li) in oldap_connect()
525 li->proto = ldap_pvt_url_scheme2proto(data->state.up.scheme); in oldap_connect()
526 conn->proto.ldapc = li; in oldap_connect()
529 Curl_sasl_init(&li->sasl, data, &saslldap); in oldap_connect()
548 rc = ldap_init_fd(conn->sock[FIRSTSOCKET], li->proto, hosturl, &li->ld); in oldap_connect()
564 ldap_set_option(li->ld, LDAP_OPT_DEBUG_LEVEL, &do_trace); in oldap_connect()
568 ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &version); in oldap_connect()
571 ldap_set_option(li->ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF); in oldap_connect()
585 if(li->sasl.prefmech != SASL_AUTH_NONE) in oldap_connect()
598 struct ldapconninfo *li = conn->proto.ldapc; in oldap_state_mechs_resp() local
610 rc = ldap_get_dn_ber(li->ld, msg, &ber, &bv); in oldap_state_mechs_resp()
613 for(rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals); in oldap_state_mechs_resp()
615 rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals)) { in oldap_state_mechs_resp()
627 li->sasl.authmechs |= mech; in oldap_state_mechs_resp()
642 if(Curl_sasl_can_authenticate(&li->sasl, data)) in oldap_state_mechs_resp()
663 struct ldapconninfo *li = conn->proto.ldapc; in oldap_state_sasl_resp() local
668 li->servercred = NULL; in oldap_state_sasl_resp()
669 rc = ldap_parse_sasl_bind_result(li->ld, msg, &li->servercred, 0); in oldap_state_sasl_resp()
675 result = Curl_sasl_continue(&li->sasl, data, code, &progress); in oldap_state_sasl_resp()
680 if(li->servercred) in oldap_state_sasl_resp()
681 ber_bvfree(li->servercred); in oldap_state_sasl_resp()
690 struct ldapconninfo *li = conn->proto.ldapc; in oldap_state_bind_resp() local
698 rc = ldap_parse_sasl_bind_result(li->ld, msg, &bv, 0); in oldap_state_bind_resp()
716 struct ldapconninfo *li = conn->proto.ldapc; in oldap_connecting() local
722 if(li->state != OLDAP_SSL && li->state != OLDAP_TLS) { in oldap_connecting()
724 rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, &tv, &msg); in oldap_connecting()
732 li->msgid = 0; /* Nothing to abandon upon error. */ in oldap_connecting()
742 rc = ldap_parse_result(li->ld, msg, &code, NULL, NULL, NULL, NULL, 0); in oldap_connecting()
751 if(code == LDAP_PROTOCOL_ERROR && li->state != OLDAP_BINDV2 && in oldap_connecting()
755 li->sasl.prefmech == SASL_AUTH_NONE) { in oldap_connecting()
758 ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &version); in oldap_connecting()
765 switch(li->state) { in oldap_connecting()
771 if(li->sasl.prefmech != SASL_AUTH_NONE) in oldap_connecting()
781 else if(li->sasl.prefmech != SASL_AUTH_NONE) in oldap_connecting()
797 if(li->sasl.prefmech != SASL_AUTH_NONE) in oldap_connecting()
828 *done = li->state == OLDAP_STOP; in oldap_connecting()
832 if(result && li->msgid) { in oldap_connecting()
833 ldap_abandon_ext(li->ld, li->msgid, NULL, NULL); in oldap_connecting()
834 li->msgid = 0; in oldap_connecting()
843 struct ldapconninfo *li = conn->proto.ldapc; in oldap_disconnect() local
849 if(li) { in oldap_disconnect()
850 if(li->ld) { in oldap_disconnect()
854 ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb); in oldap_disconnect()
858 ldap_unbind_ext(li->ld, NULL, NULL); in oldap_disconnect()
859 li->ld = NULL; in oldap_disconnect()
861 Curl_sasl_cleanup(conn, li->sasl.authused); in oldap_disconnect()
863 free(li); in oldap_disconnect()
871 struct ldapconninfo *li = conn->proto.ldapc; in oldap_do() local
888 ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb); in oldap_do()
893 rc = ldap_search_ext(li->ld, lud->lud_dn, lud->lud_scope, in oldap_do()
904 ldap_abandon_ext(li->ld, msgid, NULL, NULL); in oldap_do()
930 struct ldapconninfo *li = conn->proto.ldapc; in oldap_done() local
931 ldap_abandon_ext(li->ld, lr->msgid, NULL, NULL); in oldap_done()
968 struct ldapconninfo *li = conn->proto.ldapc; in oldap_recv() local
984 rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_ONE, &tv, &msg); in oldap_recv()
1001 rc = ldap_parse_result(li->ld, msg, &code, NULL, &info, NULL, NULL, 0); in oldap_recv()
1030 rc = ldap_get_dn_ber(li->ld, msg, &ber, &bv); in oldap_recv()
1041 for(rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals); in oldap_recv()
1043 rc = ldap_get_attribute_ber(li->ld, msg, ber, &bv, &bvals)) { in oldap_recv()
1168 struct ldapconninfo *li = conn->proto.ldapc; in ldapsb_tls_read() local
1171 ret = (li->recv)(data, FIRSTSOCKET, buf, len, &err); in ldapsb_tls_read()
1188 struct ldapconninfo *li = conn->proto.ldapc; in ldapsb_tls_write() local
1190 ret = (li->send)(data, FIRSTSOCKET, buf, len, FALSE, &err); in ldapsb_tls_write()