removed the duplicated function and added the ssl options (verify_peer and none) but still need to test if it works.