diff --git a/engine/engine/utils/dbHandler.js b/engine/engine/utils/dbHandler.js index 48199c0..9059f35 100644 --- a/engine/engine/utils/dbHandler.js +++ b/engine/engine/utils/dbHandler.js @@ -32,6 +32,9 @@ const connection = mysql.createConnection({ ? parseInt(process.env.DSQL_PORT) : undefined, timeout: 5000, + ssl: { + ca: fs.readFileSync(process.env.DSQL_SSL_CA_PATH || ""), + }, }); ////////////////////////////////////////////////////////////////////////////////// diff --git a/engine/engine/utils/noDatabaseDbHandler.js b/engine/engine/utils/noDatabaseDbHandler.js index 13c7d08..4958c90 100644 --- a/engine/engine/utils/noDatabaseDbHandler.js +++ b/engine/engine/utils/noDatabaseDbHandler.js @@ -10,8 +10,13 @@ const connection = mysql.createConnection({ user: process.env.DSQL_USER, password: process.env.DSQL_PASS, charset: "utf8mb4", - port: process.env.DSQL_PORT?.match(/.../) ? parseInt(process.env.DSQL_PORT) : undefined, + port: process.env.DSQL_PORT?.match(/.../) + ? parseInt(process.env.DSQL_PORT) + : undefined, timeout: 5000, + ssl: { + ca: fs.readFileSync(process.env.DSQL_SSL_CA_PATH || ""), + }, }); /** diff --git a/package.json b/package.json index cf39f90..9a95fad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.9.6", + "version": "1.9.7", "description": "Cloud-based SQL data management tool", "main": "index.js", "bin": {