Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ssl option to config so users can silence warnings when connnecting to databases without SSL #101

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

@@ -182,9 +182,10 @@ public VoteStorage initializeVoteStorage() throws IOException {
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