fixes #5414: LDAP + TLS is not LDAP + TLS but LDAP + SSL

while not critical, could we do some basic validations first (or at least some exception handling? e.g. if

data default port is not properly defined
if port var is null
etc ?