summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pawel@process-one.net>2022-11-14 11:19:51 +0100
committerPaweł Chmielowski <pawel@process-one.net>2022-11-14 11:19:51 +0100
commit6fcfe80a65dad1cb83e2f291a3811ab776d499b7 (patch)
treef304cee228b70114058a7329da698e02c2be3892
parentSilent warning in OTP24 about not specified cacerts in sql connections (diff)
Pass ssl options to mysql driver
-rw-r--r--rebar.config2
-rw-r--r--src/ejabberd_sql.erl4
2 files changed, 3 insertions, 3 deletions
diff --git a/rebar.config b/rebar.config
index 14c8c81e..980051ff 100644
--- a/rebar.config
+++ b/rebar.config
@@ -56,7 +56,7 @@
{mqtree, ".*", {git, "https://github.com/processone/mqtree", {tag, "1.0.15"}}},
{p1_acme, ".*", {git, "https://github.com/processone/p1_acme", {tag, "1.0.20"}}},
{if_var_true, mysql,
- {p1_mysql, ".*", {git, "https://github.com/processone/p1_mysql", {tag, "1.0.20"}}}},
+ {p1_mysql, ".*", {git, "https://github.com/processone/p1_mysql", "b6ad4035f25e625567f8c6a1e4b13a63590e54f6"}}},
{p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.11"}}},
{if_var_true, pgsql,
{p1_pgsql, ".*", {git, "https://github.com/processone/p1_pgsql", {tag, "1.1.19"}}}},
diff --git a/src/ejabberd_sql.erl b/src/ejabberd_sql.erl
index bfb34b12..39c2eab7 100644
--- a/src/ejabberd_sql.erl
+++ b/src/ejabberd_sql.erl
@@ -1061,10 +1061,10 @@ pgsql_execute_to_odbc(_) -> {updated, undefined}.
%% part of init/1
%% Open a database connection to MySQL
-mysql_connect(Server, Port, DB, Username, Password, ConnectTimeout, Transport, _) ->
+mysql_connect(Server, Port, DB, Username, Password, ConnectTimeout, Transport, SSLOpts0) ->
SSLOpts = case Transport of
ssl ->
- [ssl_required];
+ [ssl_required|SSLOpts0];
_ ->
[]
end,