Module: sems
Branch: master
Commit: 02b7f945c1e47d99d85e32c3158819e2028e41f4
URL: 
https://github.com/sems-server/sems/commit/02b7f945c1e47d99d85e32c3158819e2028e41f4

Author: Juha Heinanen <[email protected]>
Committer: Juha Heinanen <[email protected]>
Date: 2015-02-21T04:09:40+02:00

apps/conference: added MySQL SSL support also to conference app

---

Modified: apps/conference/Conference.cpp

---

Diff:  
https://github.com/sems-server/sems/commit/02b7f945c1e47d99d85e32c3158819e2028e41f4.diff
Patch: 
https://github.com/sems-server/sems/commit/02b7f945c1e47d99d85e32c3158819e2028e41f4.patch

---

diff --git a/apps/conference/Conference.cpp b/apps/conference/Conference.cpp
index 9a90c26..7f9a025 100644
--- a/apps/conference/Conference.cpp
+++ b/apps/conference/Conference.cpp
@@ -168,7 +168,7 @@ int ConferenceFactory::onLoad()
 
   /* Get default audio from MySQL */
 
-  string mysql_server, mysql_user, mysql_passwd, mysql_db;
+  string mysql_server, mysql_user, mysql_passwd, mysql_db, mysql_ca_cert;
 
   mysql_server = cfg.getParameter("mysql_server");
   if (mysql_server.empty()) {
@@ -192,6 +192,8 @@ int ConferenceFactory::onLoad()
     mysql_db = "sems";
   }
 
+  mysql_ca_cert = cfg.getParameter("mysql_ca_cert");
+
   try {
 
 #ifdef VERSION2
@@ -199,6 +201,10 @@ int ConferenceFactory::onLoad()
 #else
     Connection.set_option(new mysqlpp::ReconnectOption(true));
 #endif
+    if (!mysql_ca_cert.empty())
+      Connection.set_option(
+       new mysqlpp::SslOption(0, 0, mysql_ca_cert.c_str(), "",
+                              "DHE-RSA-AES256-SHA"));
     Connection.connect(mysql_db.c_str(), mysql_server.c_str(),
                       mysql_user.c_str(), mysql_passwd.c_str());
     if (!Connection) {

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to