TLS support

adds support for TLS to Reader