by APIJunkie
31. July 2008 00:45
Having an SSL certificate that does not match the server name or expired or is invalid for any other reason can cause this error.
You will receive the above error message when connecting to your SQL server.
Very annoying and hard to find especially if the server hasn't been started for a few weeks since the certificate was installed ( it seems like the certificate usage is refreshed only when the SQL server service is restarted).
After a little searching, I found an article about this SQL error and how to solve it.
In our case we used a SelfSSL generated certificate.
Note that to fix the problem we had to delete certificates from:
Certificates (local computer)
Personal
Certificates
After deleting the certificate you need to stop and start the SQL server service.