From the MySQL documentation, the VERIFY_IDENTITY SSL mode should verify the hostname in the server's certificate matches the hostname to which to client tried to connect. However, when setting ssl_mode: :verify_identity the gem connects even if there is a hostname mismatch. If I set ssl_mode: :verify_identity AND sslverify: true, the gem returns an SSL validation error as expected.
Using mysql2 version 0.4.8 and MariaDB connector C version 2.3.0 as the driver.
From the MySQL documentation, the
VERIFY_IDENTITYSSL mode should verify the hostname in the server's certificate matches the hostname to which to client tried to connect. However, when settingssl_mode: :verify_identitythe gem connects even if there is a hostname mismatch. If I setssl_mode: :verify_identityANDsslverify: true, the gem returns an SSL validation error as expected.Using mysql2 version 0.4.8 and MariaDB connector C version 2.3.0 as the driver.