Skip to content

Commit

Permalink
Mariadb/mysql: Fix ssl option on autobackup cmdline and deprecated wa…
Browse files Browse the repository at this point in the history
…rnings (#6537)

Fix: error: 2026: "TLS/SSL error: Server certificate validation failed. The certificate's CN name does not match the passed value. Error 0x800B010F(CERT_E_CN_NO_MATCH)"
by adding '--ssl-verify-server-cert=false'
and updating the modules.
  • Loading branch information
PTR-inc authored Nov 15, 2024
1 parent 3da60b4 commit dd21f14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db.js
Original file line number Diff line number Diff line change
Expand Up @@ -3290,7 +3290,7 @@ module.exports.CreateDB = function (parent, func) {
if (props.ssl) {
sslOptions = ' --ssl';
if (props.ssl.cacertpath) sslOptions = ' --ssl-ca=' + props.ssl.cacertpath;
if (props.ssl.dontcheckserveridentity != true) sslOptions += ' --ssl-verify-server-cert';
if (props.ssl.dontcheckserveridentity != true) {sslOptions += ' --ssl-verify-server-cert'} else {sslOptions += ' --ssl-verify-server-cert=false'};
if (props.ssl.clientcertpath) sslOptions += ' --ssl-cert=' + props.ssl.clientcertpath;
if (props.ssl.clientkeypath) sslOptions += ' --ssl-key=' + props.ssl.clientkeypath;
}
Expand Down
4 changes: 2 additions & 2 deletions meshcentral.js
Original file line number Diff line number Diff line change
Expand Up @@ -4222,11 +4222,11 @@ function mainStart() {
if (sessionRecording == true) { modules.push('[email protected]'); } // Need to get the remote desktop JPEG sizes to index the recodring file.
if (config.letsencrypt != null) { modules.push('[email protected]'); } // Add acme-client module. We need to force v4.2.4 or higher since olver versions using SHA-1 which is no longer supported by Let's Encrypt.
if (config.settings.mqtt != null) { modules.push('[email protected]'); } // Add MQTT Modules
if (config.settings.mysql != null) { modules.push('mysql2@3.6.2'); } // Add MySQL.
if (config.settings.mysql != null) { modules.push('mysql2@3.11.4'); } // Add MySQL.
//if (config.settings.mysql != null) { modules.push('@mysql/xdevapi@8.0.33'); } // Add MySQL, official driver (https://dev.mysql.com/doc/dev/connector-nodejs/8.0/)
if (config.settings.mongodb != null) { modules.push('[email protected]'); modules.push('[email protected]'); } // Add MongoDB, official driver.
if (config.settings.postgres != null) { modules.push('[email protected]') } // Add Postgres, official driver.
if (config.settings.mariadb != null) { modules.push('mariadb@3.2.2'); } // Add MariaDB, official driver.
if (config.settings.mariadb != null) { modules.push('mariadb@3.4.0'); } // Add MariaDB, official driver.
if (config.settings.acebase != null) { modules.push('[email protected]'); } // Add AceBase, official driver.
if (config.settings.sqlite3 != null) { modules.push('[email protected]'); } // Add sqlite3, official driver.
if (config.settings.vault != null) { modules.push('[email protected]'); } // Add official HashiCorp's Vault module.
Expand Down

0 comments on commit dd21f14

Please sign in to comment.