added ability to ignore certificate validation for self signed certificate