Added support for ssl.