Skip to content

Commit

Permalink
Fix SSL trustServerCertificate check
Browse files Browse the repository at this point in the history
The test for whether to automatically trust the SSL certificate of
the server is backwards. This fixes it so that a value of "true"
skips SSL certificate validation and trusts all certificates.
  • Loading branch information
sehrope committed Aug 8, 2015
1 parent ec8dc4a commit faff539
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -191,7 +191,7 @@ public class MySQLProtocol implements Protocol {

private SSLSocketFactory getSSLSocketFactory(boolean trustServerCertificate) throws QueryException
{
if (jdbcUrl.getOptions().trustServerCertificate
if (!jdbcUrl.getOptions().trustServerCertificate
&& jdbcUrl.getOptions().serverSslCert == null) {
return (SSLSocketFactory)SSLSocketFactory.getDefault();
}
Expand Down

0 comments on commit faff539

Please sign in to comment.