Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve TLS documentation for older servers
Older/EOL database server versions tend to be built with ancient OpenSSL or yaSSL, which lack support for modern cipher suites and/or lack TLS 1.2+. At the same time, recent Golang versions have updated the default client tls.Config in ways that are incompatible with these old server versions. This commit improves TLS documentation to mention this incompatibility, provide sample code for solving it, and explain how "preferred" plaintext fallback mode is not triggered in cases of TLS incompatibilities. Closes #1635 by providing example code for solving the handshake failure. Additional information which may be helpful for reviewers/maintainers: TLS version * Go 1.18+ changes the default client TLS MinVersion to be TLS 1.2 * MySQL 5.5 and 5.6 supports TLS 1.0 * MySQL 5.7.0-5.7.27 supports TLS 1.1 * MySQL 5.7.28+ supports TLS 1.2 * MariaDB 10.1+ supports TLS 1.2 * I did not examine MySQL 5.1 or MariaDB 10.0 or anything more ancient Cipher suites * Go 1.22+ changes the default client TLS config to remove cipher suites which use RSA key exchange * MySQL 8.0+ and MariaDB 10.2+ fully support ECDHE cipher suites and are compatible with Go's current default cipher suite list. * MySQL 5.x typically needs RSA key exchange cipher suites, due to https://bugs.mysql.com/bug.php?id=82935. Likewise for MariaDB 10.1. * There are some exceptions, for example Percona Server 5.7 is built with a newer OpenSSL, https://docs.percona.com/percona-server/5.7/security/ssl-improvement.html * It is also possible to custom compile MySQL 5.7 with a newer OpenSSL version to solve the cipher suite issue, but this is not common.
- Loading branch information