/** * Full JVM settings and connection string: -Xmx512M -XX:+UseParallelGC -Djavax.net.debug=all -Dcom.mysql.jdbc.testsuite.url.default=jdbc:mysql://localhost:3306/test?user=ssltest&password=******&autoReconnect=false&jdbcCompliantTruncation=false&useUnicode=yes&characterEncoding=UTF-8&useServerPrepStmts=false&useSSL=true&requireSSL=true&trustCertificateKeyStoreUrl=c:\jvms\jdk1.5.0\bin\bug36948&trustCertificateKeyStorePassword=****** * with and w/o &verifyServerCertificate=true works * * Make keystore out of provided MySQL certificates: * keytool -import -alias mysqlServerCACert -file c:\mysql507\mysql-5-1-24-pb1604\mysql-test\std_data\cacert.pem -keystore bug36948 * keytool -import -alias mysqlClientCACert -file c:\mysql507\mysql-5-1-24-pb1604\mysql-test\std_data\client.cert -keystore bug36948 * * Orginal: -Xmx512M -XX:+UseParallelGC -Dcom.mysql.jdbc.testsuite.url.default=jdbc:mysql://localhost:3306/test?user=root&password=******&autoReconnect=false&jdbcCompliantTruncation=false&useUnicode=yes&characterEncoding=UTF-8&useServerPrepStmts=true */ package testsuite.simple; import testsuite.BaseTestCase; import javax.net.ssl.*; /** * @author Tonci * */ public class TestBug36948 extends BaseTestCase { /** * @param name */ public TestBug36948(String name) { super(name); // TODO Auto-generated constructor stub } public void testBug36948() throws Exception { System.out.println("java.vm.version : " + System.getProperty("java.vm.version")); System.out.println("java.vm.vendor : " + System.getProperty("java.vm.vendor")); System.out.println("java.runtime.version : " + System.getProperty("java.runtime.version")); System.out.println("os.name : " + System.getProperty("os.name")); System.out.println("os.version : " + System.getProperty("os.version ")); System.out.println("sun.management.compiler : " + System.getProperty("sun.management.compiler")); try { this.rs = this.stmt.executeQuery("SHOW TABLES"); while (this.rs.next()) { System.out.println(this.rs.getString(1)); } } finally { closeMemberJDBCResources(); } } /** * @param args */ public static void main(String[] args) { //&clientCertificateKeyStoreUrl=c:\jvms\jdk1.5.0\bin\bug36948&clientCertificateKeyStorePassword=***** // TODO Auto-generated method stub System.setProperty("javax.net.ssl.keyStore","c://jvms//jdk1.5.0//bin//bug36948"); System.setProperty("javax.net.ssl.keyStorePassword","*****"); //System.setProperty("javax.net.ssl.trustStore","c://jvms//jdk1.5.0//bin//bug36948"); //System.setProperty("javax.net.ssl.trustStorePassword","******"); junit.textui.TestRunner.run(TestBug36948.class); } }