Skip to content

Conversation

@meowsome
Copy link

@meowsome meowsome commented Jul 6, 2020

Hi,

Sorry for any hiccups, this is my first time doing a pull request so I am learning.

The changes I've made allow for users to silence the following warnings that appear in console by setting 'ssl' to 'false' when they are using a database without SSL (like on a paid server host):

WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

String database = configuration.getString("storage.mysql.database", "superbvote");
String table = configuration.getString("storage.mysql.table", "superbvote");
boolean readOnly = configuration.getBoolean("storage.mysql.read-only");
boolean ssl = configuration.getBoolean("storage.mysql.ssl");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here, the default value should be added as 'true' otherwise users without the config file updated, will not use SSL by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants