The "Server certificate was rejected by the verifier because it has expired" error occurs when the validity period of the server certificate is over. When a certificate expires, the proper thing to do is to renew it (or replace it with a new certificate) - this has to be done at the server.
In rare cases when this can’t be done (if you don’t have control over the server and its administrators are refusing to solve the problem), it's possible to work around this issue by writing a custom certificate handler.