From 8179777f7359049f462ac35b5a2b5964121d8ae0 Mon Sep 17 00:00:00 2001 From: Noah Zalev Date: Sun, 2 May 2021 14:43:55 -0400 Subject: [PATCH] Add 2-way auth options to mysqldump --- db.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db.js b/db.js index 00b67a82..3eea4466 100644 --- a/db.js +++ b/db.js @@ -1621,11 +1621,15 @@ module.exports.CreateDB = function (parent, func) { if (props.ssl) { sslOptions = ' --ssl'; if (props.ssl.cacertpath) sslOptions = ' --ssl-verify-server-cert --ssl-ca=' + props.ssl.cacertpath; + if (props.ssl.clientcertpath) sslOptions += ' --ssl-cert=' + props.ssl.clientcertpath; + if (props.ssl.clientkeypath) sslOptions += ' --ssl-key=' + props.ssl.clientkeypath; } } else { if (props.ssl) { sslOptions = ' --ssl-mode=required'; if (props.ssl.cacertpath) sslOptions = ' --ssl-mode=verify_identity --ssl-ca=' + props.ssl.cacertpath; + if (props.ssl.clientcertpath) sslOptions += ' --ssl-cert=' + props.ssl.clientcertpath; + if (props.ssl.clientkeypath) sslOptions += ' --ssl-key=' + props.ssl.clientkeypath; } } cmd += sslOptions;