first attempt to support ssl