Added ssl support