When the openssl library cannot verify a server certificate because the hostnames don't match, it outputs the error message: "hostname does not match the server certificate".
This causes people to throw their hands up and circumvent the security by disabling the cert verification or turning off SSL/TLS altogether.
It would be a huge improvement towards helping people debug and fix their mismatched certs if the error included the hostname that wasn't matching.
When the openssl library cannot verify a server certificate because the hostnames don't match, it outputs the error message: "hostname does not match the server certificate".
This causes people to throw their hands up and circumvent the security by disabling the cert verification or turning off SSL/TLS altogether.
It would be a huge improvement towards helping people debug and fix their mismatched certs if the error included the hostname that wasn't matching.
That's what my commit does.