~ubuntu-branches/ubuntu/saucy/curl/saucy-201307251546

« back to all changes in this revision

Viewing changes to lib/openldap.c

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-03-23 16:24:51 UTC
  • mto: (3.6.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 59.
  • Revision ID: package-import@ubuntu.com-20120323162451-z4gstlabjkgnrh7h
Tags: upstream-7.25.0
ImportĀ upstreamĀ versionĀ 7.25.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
#include "curl_ldap.h"
47
47
#include "curl_memory.h"
48
48
#include "curl_base64.h"
49
 
#include "http_proxy.h"
50
49
 
51
50
#define _MPRINTF_REPLACE /* use our functions only */
52
51
#include <curl/mprintf.h>
208
207
 
209
208
  ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
210
209
 
211
 
  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
212
 
    /* for LDAP over HTTP proxy */
213
 
    struct HTTP http_proxy;
214
 
    ldapconninfo *li_save;
215
 
    CURLcode result;
216
 
 
217
 
    /* BLOCKING */
218
 
    /* We want "seamless" LDAP operations through HTTP proxy tunnel */
219
 
 
220
 
    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
221
 
     * conn->proto.http; we want LDAP through HTTP and we have to change the
222
 
     * member temporarily for connecting to the HTTP proxy. After
223
 
     * Curl_proxyCONNECT we have to set back the member to the original struct
224
 
     * LDAP pointer
225
 
     */
226
 
    li_save = data->state.proto.generic;
227
 
    memset(&http_proxy, 0, sizeof(http_proxy));
228
 
    data->state.proto.http = &http_proxy;
229
 
    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
230
 
                               conn->host.name, conn->remote_port);
231
 
 
232
 
    data->state.proto.generic = li_save;
233
 
 
234
 
    if(CURLE_OK != result)
235
 
      return result;
236
 
  }
237
 
 
238
210
#ifdef USE_SSL
239
211
  if(conn->handler->flags & PROTOPT_SSL) {
240
212
    CURLcode res;