Validate the server certificate for HTTPS connections