This error occurs when the server hostname does not match the certificate CN/SAN. You can either update the certificate or disable hostname verification.