syn2mas: only set the SSL options if we set any of them

This commit is contained in:
Quentin Gliech
2024-08-07 14:39:05 +02:00
parent c8d868850c
commit add48537c6

View File

@@ -57,7 +57,9 @@ export async function connectToSynapseDatabase({
database.args.sslkey && (ssl.key = await readFile(database.args.sslkey));
database.args.sslpassword && (ssl.passphrase = database.args.sslpassword);
connection.ssl = ssl;
if (Object.keys(ssl).length > 0) {
connection.ssl = ssl;
}
return knex({
client: "pg",
@@ -103,7 +105,9 @@ export async function connectToMASDatabase({
ssl.key = await readFile(database.ssl_key_file);
}
connection.ssl = ssl;
if (Object.keys(ssl).length > 0) {
connection.ssl = ssl;
}
return knex({
client: "pg",