public void testBug20685022() throws Exception {
  if (!isCommunityEdition()) {
    return;
  }
  final Properties props=new Properties();
  props.clear();
  props.setProperty("useSSL","true");
  props.setProperty("requireSSL","true");
  props.setProperty("verifyServerCertificate","false");
  getConnectionWithProps(props);
  props.clear();
  props.setProperty("useSSL","true");
  props.setProperty("requireSSL","true");
  props.setProperty("verifyServerCertificate","true");
  props.setProperty("trustCertificateKeyStoreUrl","file:src/testsuite/ssl-test-certs/test-cert-store");
  props.setProperty("trustCertificateKeyStoreType","JKS");
  props.setProperty("trustCertificateKeyStorePassword","password");
  getConnectionWithProps(props);
  props.clear();
  props.setProperty("useSSL","true");
  props.setProperty("requireSSL","true");
  props.setProperty("verifyServerCertificate","true");
  String trustStorePath="src/testsuite/ssl-test-certs/test-cert-store";
  System.setProperty("javax.net.ssl.keyStore",trustStorePath);
  System.setProperty("javax.net.ssl.keyStorePassword","password");
  System.setProperty("javax.net.ssl.trustStore",trustStorePath);
  System.setProperty("javax.net.ssl.trustStorePassword","password");
  getConnectionWithProps(props);
}

public void testBug20685022 ( ) throws Exception { if ( ! isCommunityEdition ( ) ) { return ; } final Properties props = new Properties ( ) ; props . clear ( ) ; props . setProperty ( "useSSL" , "true" ) ; props . setProperty ( "requireSSL" , "true" ) ; props . setProperty ( "verifyServerCertificate" , "false" ) ; getConnectionWithProps ( props ) ; props . clear ( ) ; props . setProperty ( "useSSL" , "true" ) ; props . setProperty ( "requireSSL" , "true" ) ; props . setProperty ( "verifyServerCertificate" , "true" ) ; props . setProperty ( "trustCertificateKeyStoreUrl" , "file:src/testsuite/ssl-test-certs/test-cert-store" ) ; props . setProperty ( "trustCertificateKeyStoreType" , "JKS" ) ; props . setProperty ( "trustCertificateKeyStorePassword" , "password" ) ; getConnectionWithProps ( props ) ; props . clear ( ) ; props . setProperty ( "useSSL" , "true" ) ; props . setProperty ( "requireSSL" , "true" ) ; props . setProperty ( "verifyServerCertificate" , "true" ) ; String trustStorePath = "src/testsuite/ssl-test-certs/test-cert-store" ; System . setProperty ( "javax.net.ssl.keyStore" , trustStorePath ) ; System . setProperty ( "javax.net.ssl.keyStorePassword" , "password" ) ; System . setProperty ( "javax.net.ssl.trustStore" , trustStorePath ) ; System . setProperty ( "javax.net.ssl.trustStorePassword" , "password" ) ; getConnectionWithProps ( props ) ; }
tests fix for bug # 20685022 - ssl connection to mysql 5 . 7 . 6 community server fails this test is duplicated in testuite . regression . connectionregressiontest . jdbc4 . testbug20685022 ( ) .
