Ldapsearch
From DWIKI
HOWTO
ldapsearch using starttls
ldapsearch -x -ZZ -h ldap.example.com
check server certificate starttls
openssl s_client -connect ldap.example.com:389 -starttls ldap
ldapsearch -x -ZZ -h ldap.example.com
openssl s_client -connect ldap.example.com:389 -starttls ldap