Completely rework TLS tests

The TLS tests should now cover what was tested using a shell-script
before.
Merge pull request #255 from Incubaid/tls-tests

Rework TLS tests