Skip to content

Support ssl in mysql connections#2367

Open
an-tao wants to merge 6 commits into
masterfrom
mysql_ssl
Open

Support ssl in mysql connections#2367
an-tao wants to merge 6 commits into
masterfrom
mysql_ssl

Conversation

@an-tao

@an-tao an-tao commented Aug 6, 2025

Copy link
Copy Markdown
Member

@an-tao an-tao requested a review from Copilot August 6, 2025 11:00

Copilot AI left a comment

Copy link
Copy Markdown

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());

Copilot AI Aug 6, 2025

Copy link

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.

Suggested change
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.
Comment thread orm_lib/src/mysql_impl/MysqlConnection.cc Outdated
@mpv945

mpv945 commented Jun 12, 2026

Copy link
Copy Markdown

windows下连接mysql貌似都碰到这个问题了,现在是不是没人维护这个项目了?

@an-tao

an-tao commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

windows下连接mysql貌似都碰到这个问题了,现在是不是没人维护这个项目了?

跟libmariadb的安装有关,#2311 的最后有人有解决方案

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants