fix SSL certificate checking issue, and verify fqdn.