Add ssl support and remove dependency on mattr_accessor business