Added support for SSL connections