Added hidden "enable-ssl" database option (default: false)

This commit is contained in:
Intelli 2023-08-23 16:31:40 -06:00
parent 45d4642086
commit 0edf160f43
2 changed files with 3 additions and 1 deletions

View File

@ -43,6 +43,7 @@ public class Config extends Language {
public String MYSQL_PASSWORD;
public String LANGUAGE;
public boolean ENABLE_AWE;
public boolean ENABLE_SSL;
public boolean DISABLE_WAL;
public boolean HOVER_EVENTS;
public boolean DATABASE_LOCK;
@ -190,6 +191,7 @@ public class Config extends Language {
private void readValues() {
this.ENABLE_AWE = this.getBoolean("enable-awe", false);
this.ENABLE_SSL = this.getBoolean("enable-ssl", false);
this.DISABLE_WAL = this.getBoolean("disable-wal", false);
this.HOVER_EVENTS = this.getBoolean("hover-events", true);
this.DATABASE_LOCK = this.getBoolean("database-lock", true);

View File

@ -249,7 +249,7 @@ public class ConfigHandler extends Queue {
config.addDataSourceProperty("maintainTimeStats", "false");
/* Disable SSL to suppress the unverified server identity warning */
config.addDataSourceProperty("allowPublicKeyRetrieval", "true");
config.addDataSourceProperty("useSSL", "false");
config.addDataSourceProperty("useSSL", Config.getGlobal().ENABLE_SSL);
ConfigHandler.hikariDataSource = new HikariDataSource(config);
}