Hi Lei,
What is the command line you are using with ldapsearch?
You need to specify -Z to start TLS and use certs.
From man ldapsearch:
-Z Issue StartTLS (Transport Layer Security) extended operation. If you use -ZZ, the command will require the operation to be successful.
Give it a try.
leilei175@gmail.com writes:Maybe the root certificate is installed with OpenSSL's default certs.
> On the client side,I have set the TLS_REQCERT as demand.
> The TLS_CACERTDIR is also set, but I didn't put any certificate in the
> directory.
>
> To my surprise, even though no certificate is provided,
> ldapsearch could still succeed returning the data.
>
> Is this a bug?
Those are used if and only if you specify TLS_CACERT - or TLS_CACERTDIR
I presume, but I haven't tested that. See:
http://www.openldap.org/its/?findid=5582
--
Hallvard