This should take care of self-signed certificates.