diff --git a/server/config.js b/server/config.js index e94804b63..17fad15dd 100644 --- a/server/config.js +++ b/server/config.js @@ -20,9 +20,6 @@ const sslKeyPassphrase = args["ssl-key-passphrase"] || process.env.UPTIME_KUMA_S const isSSL = sslKey && sslCert; -const mariaDbSslCert = args["UPTIME_KUMA_DB_SSL_CERT"] || process.env.UPTIME_KUMA_DB_CA_CERT || process.env.MARIADB_SSL_CERT || undefined; -const mariaDbUseSSL = mariaDbSslCert ? "true" : "false"; - /** * Get the local WebSocket URL * @returns {string} The local WebSocket URL @@ -47,6 +44,4 @@ module.exports = { isSSL, localWebSocketURL, demoMode, - mariaDbSslCert, - mariaDbUseSSL }; diff --git a/server/setup-database.js b/server/setup-database.js index efd19f917..f99167802 100644 --- a/server/setup-database.js +++ b/server/setup-database.js @@ -7,7 +7,6 @@ const path = require("path"); const Database = require("./database"); const { allowDevAllOrigin } = require("./util-server"); const mysql = require("mysql2/promise"); -const { mariaDbUseSSL, mariaDbSslCert } = require("./config"); /** * A standalone express app that is used to setup a database @@ -234,15 +233,7 @@ class SetupDatabase { // Test connection try { let sslConfig = null; - let serverCa = undefined; - if (mariaDbUseSSL === true && !dbConfig.ssl) { - dbConfig.caFilePath = mariaDbSslCert; - serverCa = [ fs.readFileSync(mariaDbSslCert, "utf8") ]; - sslConfig = { - rejectUnauthorized: true, - ca: serverCa - }; - } else if (dbConfig.ssl) { + if (dbConfig.ssl) { sslConfig = dbConfig.ssl; }