curl-library
Re: Problem with LDAP access through SOCKS v4/v5
Date: Wed, 3 Sep 2008 14:42:04 +0200
Dear Yang,
first of all thanks for your quick reply.
I followed your suggestions but nothing changed; I got the same message:
LDAP local: ldap_simple_bind_s Not available
I also compiled the same code with
Microsoft Visual Studio 2005
version 8.0.50727.762 (SP.0507272-7600)
Microsoft .NET Framework version 2.0.50727 SP1
and I got the same error with message: LDAP local: ldap_simple_bind_s Not
available
using both SOCKS4 and SOCKS5.
The code I'm using is the following:
CURL *curl;
CURLcode res;
FILE *outfile;
char *cpErrBuff = new char [4096];
memset (cpErrBuff, 0, 4096);
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
if(curl)
{
outfile = fopen("C:/test_curl.crl", "wb");
printf ("CURL Version : %s\n", curl_version( ));
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, cpErrBuff);
curl_easy_setopt(curl, CURLOPT_URL,
"ldap://ldap.actalis.it:389/cn=Actalis Qualified Certificates
CA,ou=Qualified Certification Service Provider,o=Actalis
S.p.A.,c=IT?certificateRevocationList=*,certificateRevocationList;binary?subtree?objectClass=*");");
curl_easy_setopt(curl, CURLOPT_PROXY, "mysocketserver:1080");
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
//curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; SV1)");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
res = curl_easy_perform(curl);
printf ("\n %s", cpErrBuff);
fclose(outfile);
curl_easy_cleanup(curl);
}
if (cpErrBuff)
delete (cpErrBuff);
Do I make something wrong?
Many thanks in advance.
Massimiliano Ziccardi
On Tue, Sep 2, 2008 at 5:09 PM, Yang Tse <yangsita_at_gmail.com> wrote:
> 2008/9/2, Massimiliano Ziccardi wrote:
>
> > CURL Version : libcurl/7.18.2 compiled with Visual Studio 6 SP6 on
> Windows
> > XP SP3 with Microsoft SDK 2003 Release
> > [...]
> > LDAP local: ldap_simple_bind_s Not available
>
> For peace of mind first make a copy of the wldap32.lib file
> distributed with VC6 in "C:\Program Files\Microsoft Visual
> Studio\VC98\lib" to something like wldap32_broken.lib
>
> Afterwards overwrite the wldap32.lib file distributed with VC6 with
> the one from the 2003 Platform SDK "C:\Program Files\Microsoft
> SDK\Lib"
>
> Clean, build, and test again.
>
> --
> -=[Yang]=-
>
Received on 2008-09-03