remove unnecessary `secured` variable

replace its use with the `tls` variable that it was using itself
Merge pull request #824 from frontsidebus/patch-1

remove unnecessary `secured` variable