-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support ssl in mysql connections #2367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds SSL support to MySQL connections by configuring SSL settings with null parameters. This enables SSL connections to be established while using default SSL settings.
- Adds
mysql_ssl_set()
call with null parameters to enable basic SSL support - Maintains existing connection behavior while adding SSL capability
@@ -59,6 +59,12 @@ MysqlConnection::MysqlConnection(trantor::EventLoop *loop, | |||
static MysqlEnv env; | |||
static thread_local MysqlThreadEnv threadEnv; | |||
mysql_init(mysqlPtr_.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mysql_ssl_set() call lacks documentation explaining its purpose and the implications of using null parameters. Consider adding a comment explaining that this enables SSL with default settings and that certificate verification is not performed.
mysql_init(mysqlPtr_.get()); | |
mysql_init(mysqlPtr_.get()); | |
// Enable SSL with default settings. All parameters are set to nullptr, | |
// which means SSL is enabled but certificate verification is NOT performed. | |
// This may have security implications; see MySQL C API documentation for details. |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
#2273