Liam Gretton writes:
With ldapsearch I'd like to specify on the command line the CA certificate file without having to use TLS_CACERT in ldap.conf or any other configuration file.
See the ldap.conf(5) manpage:
env LDAPTLS_CACERT=cert.pem ldapsearch