support ssl with self-signed certificate