[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_search_s under windows?

At 09:56 PM 8/31/99 +0800, cellecial@21cn.com wrote:
>I use OpenLDAP to store certificates. Under Solaris,everything is OK. But
>under windows,something is strange. I use VC6.0.
>#include <stdio.h>
>#include <windows.h>
>#include <winldap.h>
>	LDAP *ld;
>	LDAPMessage *res;
>	int ret,count;
>	ld=ldap_open("",LDAP_PORT);
>	ret=ldap_simple_bind_s(ld,NULL,NULL);
>	ret=ldap_search_s(ld,"c=CN",LDAP_SCOPE_SUBTREE,"(userCertificate;binary=*)",NULL,0,&res);
>	count=ldap_count_entries(ld,res);
>	printf("count=%d\n",count);
>Under Solaris, the result is "count=18",it's correct. But under windows,
>result is "count=0"! Why? If filter is "cn=*", the results under two platforms
>are same.Only filters like "userCertificate;binary","certificateRevocationList;
>binary" have the different results.
>Any ideas? Thanks in advance.

I suspect it's a winldap issue.  Check the server logs
and count the number of entries returned for the search.