Skip to content

Commit

Permalink
Added hidden "enable-ssl" database option (default: false)
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed Aug 23, 2023
1 parent 45d4642 commit 0edf160
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/net/coreprotect/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/coreprotect/config/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static void loadDatabase() {
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);
}
Expand Down

0 comments on commit 0edf160

Please sign in to comment.