remove trailing blanks (sed -i -r -e "s/[[:blank:]]+$//")
make TLSSocket configurable by TLSConfig