Skip to content

Commit

Permalink
Replace deprecated mysql_ssl_set with mysql_options()
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Oct 30, 2023
1 parent f2c4ff0 commit 70c5dc6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/zm_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ bool zmDbConnect() {
}

if ( !staticConfig.DB_SSL_CA_CERT.empty() ) {
mysql_ssl_set(&dbconn,
staticConfig.DB_SSL_CLIENT_KEY.c_str(),
staticConfig.DB_SSL_CLIENT_CERT.c_str(),
staticConfig.DB_SSL_CA_CERT.c_str(),
nullptr, nullptr);
mysql_options(&dbconn, MYSQL_OPT_SSL_KEY, staticConfig.DB_SSL_CLIENT_KEY.c_str());
mysql_options(&dbconn, MYSQL_OPT_SSL_CERT, staticConfig.DB_SSL_CLIENT_CERT.c_str());
mysql_options(&dbconn, MYSQL_OPT_SSL_CA, staticConfig.DB_SSL_CA_CERT.c_str());
}

std::string::size_type colonIndex = staticConfig.DB_HOST.find(":");
Expand Down

0 comments on commit 70c5dc6

Please sign in to comment.