applies ssl
switches to ssl