openLDAP TLS APIs usage issue