I am getting this error
The certificate for this server is invalid. You might be connecting to a server
that is pretending to be \"server addres goes here\"
Are you using an HTTPS url. If so go to the url in a browser and check the certificate. Ensure the certificate is valid for the domain or sub domain that you are trying to use, and that all the intermediate certificates have been installed on your server. I had a problem similar to this, and the solution was to install the intermediate certificates.