List:Commits« Previous MessageNext Message »
From:mmatthews Date:March 1 2007 9:19pm
Subject:Connector/J commit: r6335 - branches/branch_5_0/connector-j branches/branch_5_0/connector-j/src/com/mysql/jdbc branches/branch_5_0/connector-j/src/tes...
View as plain text  
Added:
   branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/
   branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem
   branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-key.pem
   branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-cert.pem
   branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-key.pem
   branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-req.pem
   branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/test-cert-store
   trunk/connector-j/src/testsuite/ssl-test-certs/
   trunk/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem
   trunk/connector-j/src/testsuite/ssl-test-certs/ca-key.pem
   trunk/connector-j/src/testsuite/ssl-test-certs/server-cert.pem
   trunk/connector-j/src/testsuite/ssl-test-certs/server-key.pem
   trunk/connector-j/src/testsuite/ssl-test-certs/server-req.pem
   trunk/connector-j/src/testsuite/ssl-test-certs/test-cert-store
Modified:
   branches/branch_5_0/connector-j/CHANGES
   branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java
   branches/branch_5_0/connector-j/src/testsuite/regression/ConnectionRegressionTest.java
   trunk/connector-j/CHANGES
   trunk/connector-j/src/com/mysql/jdbc/MysqlIO.java
   trunk/connector-j/src/testsuite/regression/ConnectionRegressionTest.java
Log:
- Fixed BUG#25545 - Client options not sent correctly when using SSL,
	  leading to stored procedures not being able to return results. Thanks
	  to Don Cohen for the bug report, testcase and patch.

Modified: branches/branch_5_0/connector-j/CHANGES
===================================================================
--- branches/branch_5_0/connector-j/CHANGES	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/CHANGES	2007-03-01 21:19:38 UTC (rev 6335)
@@ -1,6 +1,12 @@
 # Changelog
 # $Id$
 
+03-nn-07 - Version 5.0.6
+
+	- Fixed BUG#25545 - Client options not sent correctly when using SSL,
+	  leading to stored procedures not being able to return results. Thanks
+	  to Don Cohen for the bug report, testcase and patch.
+	  
 03-01-07 - Version 5.0.5
 
     - Fixed BUG#23645 - Some collations/character sets reported as "unknown"

Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/MysqlIO.java	2007-03-01 21:19:38 UTC (rev 6335)
@@ -3890,7 +3890,7 @@
 
         Buffer packet = new Buffer(packLength);
 
-        if ((this.clientParam & CLIENT_RESERVED) != 0) {
+        if (this.use41Extensions) {
             packet.writeLong(this.clientParam);
         } else {
             packet.writeInt((int) this.clientParam);
@@ -3909,7 +3909,7 @@
                 secureAuth411(null, packLength, user, password, database, true);
             }
         } else {
-            if ((this.clientParam & CLIENT_RESERVED) != 0) {
+            if (this.use41Extensions) {
                 packet.writeLong(this.clientParam);
                 packet.writeLong(this.maxThreeBytes);
             } else {

Modified: branches/branch_5_0/connector-j/src/testsuite/regression/ConnectionRegressionTest.java
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/regression/ConnectionRegressionTest.java	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/src/testsuite/regression/ConnectionRegressionTest.java	2007-03-01 21:19:38 UTC (rev 6335)
@@ -1986,4 +1986,48 @@
 		assertEquals("Missing setters for listed configuration properties.", "", missingSettersBuf.toString());
 		assertEquals("Missing getters for listed configuration properties.", "", missingSettersBuf.toString());
 	}
+	
+	/**
+	 * Tests fix for BUG#25545 - Client flags not sent correctly during handshake
+	 * when using SSL.
+	 * 
+	 * Requires test certificates from testsuite/ssl-test-certs to be installed
+	 * on the server being tested.
+	 * 
+	 * @throws Exception if the test fails.
+	 */
+	public void testBug25545() throws Exception {
+		if (!versionMeetsMinimum(5, 0)) {
+			return;
+		}
+		
+		if (isRunningOnJdk131()) {
+			return;
+		}
+	
+		createProcedure("testBug25545", "() BEGIN SELECT 1; END");
+		
+		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");
+		
+		
+		Connection sslConn = null;
+		
+		try {
+			Properties props = new Properties();
+			props.setProperty("useSSL", "true");
+			props.setProperty("requireSSL", "true");
+			
+			sslConn = getConnectionWithProps(props);
+			sslConn.prepareCall("{ call testBug25545()}").execute();
+		} finally {
+			if (sslConn != null) {
+				sslConn.close();
+			}
+		}
+	}
 }

Added: branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIEODCCAyCgAwIBAgIBADANBgkqhkiG9w0BAQQFADB1MQswCQYDVQQGEwJVUzER
+MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xDjAMBgNVBAoTBU15
+U1FMMRIwEAYDVQQDEwlsb2NhbGhvc3QxHTAbBgkqhkiG9w0BCQEWDm1hcmtAbXlz
+cWwuY29tMB4XDTA3MDMwMTE5MjQwOFoXDTM0MDcxNzE5MjQwOFowdTELMAkGA1UE
+BhMCVVMxETAPBgNVBAgTCElsbGlub2lzMRAwDgYDVQQHEwdDaGljYWdvMQ4wDAYD
+VQQKEwVNeVNRTDESMBAGA1UEAxMJbG9jYWxob3N0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z+FYQgngwvEdSEY+SqJ
+ui5YU0e/AIDSj/TtKApZGRrIbMn9/XNrSTOzNg==
+-----END CERTIFICATE-----

Added: branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-key.pem
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-key.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/ca-key.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEApezv7SgIGbp7yXkEpLgWwnqkGulFZOQ9K28N1Hv3xseF1qAb
+/lxsi5ZH2n6V0P22VbWiJnVsJ82iKgjrCqrQL052rYRqHUktyljgk5VHbrKQO+Lr
+Mx1jLZQoGeyN/SyDqDrP3B0A7GdylrAt7+IcB83HGMWQZ3S2zLjGQvBOPxm7lZnp
+fyF2r+yZZnJJDFdxfj15tKFnhpFkc/nnMX/+eS9LYk6fZUOOa2xQOaTmrXdyT8sq
+TKhA01bYU7DRc8VSBWi7+mNfdHYy5UZdLjEb/XUHwgMVPnQeyNvKjFRu1zPnQLm9
+S6YCCtzqlb4wyCulsReaE0xwf4PFtXkul1wzpwIDAQABAoIBAFzmFMsOT8K/81Cx
+LhVfcHbAnaLnmk/LrifkTLT8F5U23st051d5vdhFcsN1fkH92xmP0VKBCeYbLsEk
+LxzQ2DC0WKP78EGnWDjjnBFlUhI7bZ/qA8+hk4bQXcdt922Zf7kv/HL71imGHdUa
+nQ2i5hjEcMWAz8HsyfBDP9X4n4aZ5W9FjJ6uD/mPvbJkWWh3HDPSICWIJ/SanJyb
+7ftKs8Bn77i5t85eTeX33gJfRWdoyg9mtNbhMPo+4TGyroMYS9HF3/tMGA5U0a8G
+PUUvNz5xmKu2yZs/9QFGIEVrbA9mMxJb+Yvq/xuGij/StgSRARWjiQAVmlIPYEG1
+fypeq0ECgYEA3DMFpwUbZXSmL2pnXO9G4wea2B4KpDzog9uidqe5H0oRVu0KeMPO
+s4vUzfwmtO4uYxBGFlRGFc0Pz8+72K+3rtECGzU464shVzqODQ3U/qCelMOgwIpd
+zD6hJWCPBYxiPx+fK0CnnlouQGNEKfkArK5sDIEyub2M3vsP0O9IumECgYEAwOb4
+nWWVeJTk5blp8NvrKcK6obPHG9UCrmjMPb7YOtSk2cDSbNvPSVefWdCeLz6o3J+C
+JWTr5Ch1Na3lN3YDFQt2jsostfcDjN1rxLS2Famh7U8U5mgnmGBN9c4cER7gkePs
+gNbBKvGznOrzYd5c+lhyFmqdTr/xfC2Ce7Ti+wcCgYAmVjO7umXkqgRs6OeKBJag
+3CgXTFOp+Hi6zDhi1Byk1+5g5fAWynBoTgYEvsu2YGlvEdxB8vYowYTpN0+LEDy4
+kOb++aspRxXM7ALjPu9ATZKOb+jC3NQrxROlQERmQOSx/L1neGA2b5jx2NZ7QEDf
+z5Y8Lxo3wEqQX8GHLMHKwQKBgE9vDRNrYFiOH4/FgS2Qsc65hDbQG/6HAZqmRuxq
+KQpYxCVy9HOlND+EWHcYo/rad5iaCnKxkz2Zt2JKYGgtLWm+Fa0I7c5kkE6yYw1W
+SOC0wJxDA105qIxjo9bDb+VQ7LLGw33ucQ7pBshoK56yfWENiLVYY7yo55z19JRS
+UWGDAoGAHipLHIVjo19t+TKd7G3HPuAuoVuL6whLu6N97blcxMjNb00bjC+D3ErD
+PpHrqO2aetJIisMPK4tVieEGSVe9x5tiHcCkl54ymlLKIVAXpywwiEEDO1NULOw8
+5hl+JBHmVZLm1AkOeoaTanTXsIrfomSX0jXZGEmBXpiHwuMdzaE=
+-----END RSA PRIVATE KEY-----

Added: branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-cert.pem
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-cert.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-cert.pem	2007-03-01 21:19:38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MxKjbGXorZ0ZtjX+mv3RY2YEM0toQIKBylOLyrcVbQ4Q4mr0r8OVnU
+HtIpOgLIJX7+GboEz6uafRb+2JDSfobnS+miFbURhGbkQtYor9TcBdwGItEo0SkS
+9eaPq5pw6Q10t9uxOA90Tc183mftt70pwg0f/oMsOD1fIuGlUPksIp1SmVvW3cD/
+0a1JGmTYzLLxMv0=
+-----END CERTIFICATE-----

Added: branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-key.pem
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-key.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-key.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEArpj7aiOVBjDAT55tD8NFUuEE3hScfOc+3umDcVHNIYEZOfsD
+Bn24pqwUIIsKkIAe6OS3isLSAF24pi9k+xIDvn+jx6GRtMeg09nowK3kk+gI2gUp
+99qatKj28gNYwXSVm7pap16KuZvqcBPGAZFjG/YCbOTanD4q7jz0mg3hhilM9ETk
+HM2pkFdD7xfXPB2Ix8Kf8osorSFPGOoECVDtwrF+wRUdE690qe6qj60yTBh3GP0k
+8YESohI8ie99jwdQY0PWT1fmLo2fZvxgpjmL51YIyPmz08biB/S3A6ld5iOiO1Rl
+QkfrFGiTuIWe+00DEpcDWJ3Qh4MFXgr1Rhf9kQIDAQABAoIBAQCtVFg7TWmzRJCW
+OhvhSyS2G4c+hU25PcSPfVitFd1EBqqpgcTGG+dFJ42vpPju7RJCeFSx36ilDmWy
+LVjdW0v2QTaxh3dj9c52olzLc5Z5MyAeeIPqd82fziGhrqrdGsUvXTiD8Xpcuylo
+7GhkxBWU+4v62NMhyyHJcyANE/ywtwmcsPgrg2iitOitZRKKoq2H1ypDLsXGfQ2w
+zErJE/iz8Khlf+eNFToP9S3spALzRuXblrHdwLanw+Bn+uc6nYdfQkJtPgNUBV4Q
++6pRcq6qmpezOFR5+9EtZgvQ3uFisCPFkMcogiaherY4g1nfpEk+0pPyxQep6Xkf
+mTsBlupBAoGBANp6Y67ksONlJkQDkGHodkpdbhY7JYrhRvSjpEwp8FirtQ29Tto5
+HRIUivA2nysB6kWnZsAV9duQbA9x0CkFzUv8Ilxpg2v/do8svPQB5kSlJlRpjPxm
+fUohZrJPiVwzE8jpxEq/20bNnLXA29vUh2jnn0CnP74wo63hci3KlPt5AoGBAMyV
+V5T/V9ynzKlcnos5k6PgEUzbH99uYBRncBDdIKavuXtv9K/yABP4VxYCTyOCQGIP
+Tnv5/iHi3dc052yYWVF+Yfzpa7Mz2jQ3rOuBmtrz8UQ3gqBiN8KmqT4AhhDPiCYS
+RR2l9kWBUh1cD3l9GZ8tJv2OPOlg7d1l/nyXvHTZAoGAJdci4szbUldXnFodrMeN
+jW3HPnR6GSbRmlepgkOVTFZZIosSWDuiLFqAggCD6vgG8o9+/XAQSDoobThiPGiz
+2SBPd0ATMiZqC3xNMdoOXv9XtzEc6S57LtbAKcwa12xFVfwfMm8udIHyTYycx+N0
+nJfZfmI5aSCViO1OUF4RFckCgYBf4m7WCocniA3IIvy7zBSCbfYty1W45oZpicFg
+ZgNznFCWpfZMsGOQ+If4bMSio92BGCN0v8p4H1hSER2WLCFQrKdIXi54IwlWB/In
+vurRTBv8GPhEK0RvGqWfxacQIfRxw4ZZSvuNv/q4f/lQu21SyVrI4+1whFl3tuH7
+izJsoQKBgF18X5RBAgr9jURXBMl1PZND3I7BmaSyOrJanBwF08ljNPFPY4XSI05e
+v7Lwq8EqsnM27OPZlWwL7lCi92j7CbHLYRmOCtCCltWyIZ0UAjN592YvuipBRwcW
+3pvmi/QG7JVCMa97IjWOCg8eHtBWZ+OQCTbzOChb8ea8StD3Qwi1
+-----END RSA PRIVATE KEY-----

Added: branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-req.pem
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-req.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/server-req.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICwzCCAasCAQAwfjELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMRAw
+DgYDVQQHEwdDaGljYWdvMRcwFQYDVQQKEw5NeSBDb21wYW55IEx0ZDESMBAGA1UE
+AxMJbG9jYWxob3N0MR0wGwYJKoZIhvcNAQkBFg5tYXJrQG15c3FsLmNvbTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK6Y+2ojlQYwwE+ebQ/DRVLhBN4U
+nHznPt7pg3FRzSGBGTn7AwZ9uKasFCCLCpCAHujkt4rC0gBduKYvZPsSA75/o8eh
+kbTHoNPZ6MCt5JPoCNoFKffamrSo9vIDWMF0lZu6Wqdeirmb6nATxgGRYxv2Amzk
+2pw+Ku489JoN4YYpTPRE5BzNqZBXQ+8X1zwdiMfCn/KLKK0hTxjqBAlQ7cKxfsEV
+HROvdKnuqo+tMkwYdxj9JPGBEqISPInvfY8HUGND1k9X5i6Nn2b8YKY5i+dWCMj5
+s9PG4gf0twOpXeYjojtUZUJH6xRok7iFnvtNAxKXA1id0IeDBV4K9UYX/ZECAwEA
+AaAAMA0GCSqGSIb3DQEBBAUAA4IBAQAEnnyg8NQVrvjkvGgtXrzNGV4gVMhTeLBO
+kb1njtvgePgTaOplMFnW/ZRysfHTFW+96gPzPAdzNHgdvbM1gmcYvmWdm0DbAu13
+VV7QU/9yfaspbuhgcFI/UP4IPe202NZRwJQmaiZmloI5PtUoHHDieybKdnu0yZKQ
+WLDE4DkvNjJ8XIG4C7SjjPauK9nQP0Gv7JUKpliR7Vc6bMUffxrtDgb+0MJw806l
+x20tA7x06sk49a4u0tQquRi1EMijIAVhMjbqZ4/aWzDuBSdCdMGNYEnZHELLe7Aq
+dqphd24vd+r4paQ9wFXxr71mXIlw1thWXkCwYNFUIj9Yo9v0ZTny
+-----END CERTIFICATE REQUEST-----

Added: branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/test-cert-store
===================================================================
(Binary files differ)


Property changes on: branches/branch_5_0/connector-j/src/testsuite/ssl-test-certs/test-cert-store
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/connector-j/CHANGES
===================================================================
--- trunk/connector-j/CHANGES	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/CHANGES	2007-03-01 21:19:38 UTC (rev 6335)
@@ -5,6 +5,12 @@
 	
 	- Bumped JDBC Specification version number in jar-file manifest.
 	
+03-nn-07 - Version 5.0.6
+
+	- Fixed BUG#25545 - Client options not sent correctly when using SSL,
+	  leading to stored procedures not being able to return results. Thanks
+	  to Don Cohen for the bug report, testcase and patch.
+	  
 03-01-07 - Version 5.0.5
 
     - Fixed BUG#23645 - Some collations/character sets reported as "unknown"

Modified: trunk/connector-j/src/com/mysql/jdbc/MysqlIO.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/MysqlIO.java	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/src/com/mysql/jdbc/MysqlIO.java	2007-03-01 21:19:38 UTC (rev 6335)
@@ -3885,7 +3885,7 @@
 
         Buffer packet = new Buffer(packLength);
 
-        if ((this.clientParam & CLIENT_RESERVED) != 0) {
+        if (this.use41Extensions) {
             packet.writeLong(this.clientParam);
         } else {
             packet.writeInt((int) this.clientParam);
@@ -3904,7 +3904,7 @@
                 secureAuth411(null, packLength, user, password, database, true);
             }
         } else {
-            if ((this.clientParam & CLIENT_RESERVED) != 0) {
+            if (this.use41Extensions) {
                 packet.writeLong(this.clientParam);
                 packet.writeLong(this.maxThreeBytes);
             } else {

Modified: trunk/connector-j/src/testsuite/regression/ConnectionRegressionTest.java
===================================================================
--- trunk/connector-j/src/testsuite/regression/ConnectionRegressionTest.java	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/src/testsuite/regression/ConnectionRegressionTest.java	2007-03-01 21:19:38 UTC (rev 6335)
@@ -1986,4 +1986,48 @@
 		assertEquals("Missing setters for listed configuration properties.", "", missingSettersBuf.toString());
 		assertEquals("Missing getters for listed configuration properties.", "", missingSettersBuf.toString());
 	}
+	
+	/**
+	 * Tests fix for BUG#25545 - Client flags not sent correctly during handshake
+	 * when using SSL.
+	 * 
+	 * Requires test certificates from testsuite/ssl-test-certs to be installed
+	 * on the server being tested.
+	 * 
+	 * @throws Exception if the test fails.
+	 */
+	public void testBug25545() throws Exception {
+		if (!versionMeetsMinimum(5, 0)) {
+			return;
+		}
+		
+		if (isRunningOnJdk131()) {
+			return;
+		}
+	
+		createProcedure("testBug25545", "() BEGIN SELECT 1; END");
+		
+		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");
+		
+		
+		Connection sslConn = null;
+		
+		try {
+			Properties props = new Properties();
+			props.setProperty("useSSL", "true");
+			props.setProperty("requireSSL", "true");
+			
+			sslConn = getConnectionWithProps(props);
+			sslConn.prepareCall("{ call testBug25545()}").execute();
+		} finally {
+			if (sslConn != null) {
+				sslConn.close();
+			}
+		}
+	}
 }

Added: trunk/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem
===================================================================
--- trunk/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/src/testsuite/ssl-test-certs/ca-cert.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIEODCCAyCgAwIBAgIBADANBgkqhkiG9w0BAQQFADB1MQswCQYDVQQGEwJVUzER
+MA8GA1UECBMIS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I7DhEEcd6jLY2gj2cnDGiNMEFDQWbVX6mBoNpxmsEA6b
++h+pxlEtnzgW0itCeeKSW5Vl0hoSfoUxdY8Qx716DIdgTfl+FF8dhP1yRtUistYA
+Qsm4+fZi1IvyIBybtXIpvO3rXFtGEyp1Hl8nLZc23Q/svK+A75Cb8yO9tpunKBlA
+KBBJYnx9hOgmTVIPbYxex8Xu9IADZp4YHCwoQlCdUW3T/oaoeiiGj7KWH01K3M7Y
+iyHzjrCIFO1/ztbrknoCTrN5SjiN4+UpTcM1NzoWa8+9dz+FYQgngwvEdSEY+SqJ
+ui5YU0e/AIDSj/TtKApZGRrIbMn9/XNrSTOzNg==
+-----END CERTIFICATE-----

Added: trunk/connector-j/src/testsuite/ssl-test-certs/ca-key.pem
===================================================================
--- trunk/connector-j/src/testsuite/ssl-test-certs/ca-key.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/src/testsuite/ssl-test-certs/ca-key.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEApezv7SgIGbp7yXkEpLgWwnqkGulFZOQ9K28N1Hv3xseF1qAb
+/lxsi5ZH2n6V0P22VbWiJnVsJ82iKgjrCqrQL052rYRqHUktyljgk5VHbrKQO+Lr
+Mx1jLZQoGeyN/SyDqDrP3B0A7GdylrAt7+IcB83HGMWQZ3S2zLjGQvBOPxm7lZnp
+fyF2r+yZZnJJDFdxfj15tKFnhpFkc/nnMX/+eS9LYk6fZUOOa2xQOaTmrXdyT8sq
+TKhA01bYU7DRc8VSBWi7+mNfdHYy5UZdLjEb/XUHwgMVPnQeyNvKjFRu1zPnQLm9
+S6YCCtzqlb4wyCulsReaE0xwf4PFtXkul1wzpwIDAQABAoIBAFzmFMsOT8K/81Cx
+LhVfcHbAnaLnmk/LrifkTLT8F5U23st051d5vdhFcsN1fkH92xmP0VKBCeYbLsEk
+LxzQ2DC0WKP78EGnWDjjnBF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l54ymlLKIVAXpywwiEEDO1NULOw8
+5hl+JBHmVZLm1AkOeoaTanTXsIrfomSX0jXZGEmBXpiHwuMdzaE=
+-----END RSA PRIVATE KEY-----

Added: trunk/connector-j/src/testsuite/ssl-test-certs/server-cert.pem
===================================================================
--- trunk/connector-j/src/testsuite/ssl-test-certs/server-cert.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/src/testsuite/ssl-test-certs/server-cert.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDZzCCAk8CAQEwDQYJKoZIhvcNAQEEBQAwdTELMAkGA1UEBhMCVVMxETAPBgNV
+BAgTCElsbGlub2lzMRAwDgYDVQQHEwdDaGljYWdvMQ4wDAYDVQQKEwVNeVNRTDES
+MBAGA1UEAxMJbG9jYWxob3N0MR0wGwYJKoZIhvcNAQkBFg5tYXJrQG15c3FsLmNv
+bTAeFw0wNzAzMDExOTI1MzNaFw0zNDA3MTcxOTI1MzNaMH4xCzAJBgNVBAYTAlVT
+MREwDwYDVQQIEwhJbGxpbm9pczEQMA4GA1UEBxMHQ2hpY2FnbzEXMBUGA1UEChMO
+TXkgQ29tcGFueSBMdGQxEjAQBgNVBAMTCWxvY2FsaG9zdDEdMBsGCSqGSIb3DQEJ
+ARYObWFya0BteXNxbC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQCumPtqI5UGMMBPnm0Pw0VS4QTeFJx85z7e6YNxUc0hgRk5+wMGfbimrBQgiwqQ
+gB7o5LeKwtIAXbimL2T7EgO+f6PHoZG0x6DT2ejAreST6AjaBSn32pq0qPbyA1jB
+dJWbulqnXoq5m+pwE8YBkWMb9gJs5NqcPiruPPSaDeGGKUz0ROQczamQV0PvF9c8
+HYjHwp/yiyitIU8Y6gQJUO3CsX7BFR0Tr3Sp7qqPrTJMGHcY/STxgRKiEjyJ732P
+B1BjQ9ZPV+YujZ9m/GCmOYvnVgjI+bPTxuIH9LcDqV3mI6I7VGVCR+sUaJO4hZ77
+TQMSlwNYndCHgwVeCvVGF/2RAgMBAAEwDQYJKoZIhvcNAQEEBQADggEBAB8Y80Bm
+Xei4miEi+nhaYoJA9OK4EBnb00O+/H3Ow/8cv3/hoRQYuEsP83qjBt11vlif2Qpx
+J0Ip0RCXgLUy+PQqmOpMiNuzjCyb9UuzhkVjHKw8mFWhRYKhJ5BVp0KbHy6YEaAH
+Pb/Jq2ymrkMxKjbGXorZ0ZtjX+mv3RY2YEM0toQIKBylOLyrcVbQ4Q4mr0r8OVnU
+HtIpOgLIJX7+GboEz6uafRb+2JDSfobnS+miFbURhGbkQtYor9TcBdwGItEo0SkS
+9eaPq5pw6Q10t9uxOA90Tc183mftt70pwg0f/oMsOD1fIuGlUPksIp1SmVvW3cD/
+0a1JGmTYzLLxMv0=
+-----END CERTIFICATE-----

Added: trunk/connector-j/src/testsuite/ssl-test-certs/server-key.pem
===================================================================
--- trunk/connector-j/src/testsuite/ssl-test-certs/server-key.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/src/testsuite/ssl-test-certs/server-key.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEArpj7aiOVBjDAT55tD8NFUuEE3hScfOc+3umDcVHNIYEZOfsD
+Bn24pqwUIIsKkIAe6OS3isLSAF24pi9k+xIDvn+jx6GRtMeg09nowK3kk+gI2gUp
+99qatKj28gNYwXSVm7pap16KuZvqcBPGAZFjG/YCbOTanD4q7jz0mg3hhilM9ETk
+HM2pkFdD7xfXPB2Ix8Kf8osorSFPGOoECVDtwrF+wRUdE690qe6qj60yTBh3GP0k
+8YESohI8ie99jwdQY0PWT1fmLo2fZvxgpjmL51YIyPmz08biB/S3A6ld5iOiO1Rl
+QkfrFGiTuIWe+00DEpcDWJ3Qh4MFXgr1Rhf9kQIDAQABAoIBAQCtVFg7TWmzRJCW
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7BmaSyOrJanBwF08ljNPFPY4XSI05e
+v7Lwq8EqsnM27OPZlWwL7lCi92j7CbHLYRmOCtCCltWyIZ0UAjN592YvuipBRwcW
+3pvmi/QG7JVCMa97IjWOCg8eHtBWZ+OQCTbzOChb8ea8StD3Qwi1
+-----END RSA PRIVATE KEY-----

Added: trunk/connector-j/src/testsuite/ssl-test-certs/server-req.pem
===================================================================
--- trunk/connector-j/src/testsuite/ssl-test-certs/server-req.pem	2007-03-01 18:40:41 UTC (rev 6334)
+++ trunk/connector-j/src/testsuite/ssl-test-certs/server-req.pem	2007-03-01 21:19:38 UTC (rev 6335)
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICwzCCAasCAQAwfjELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMRAw
+DgYDVQQHEwdDaGljYWdvMRcwFQYDVQQKEw5NeSBDb21wYW55IEx0ZDESMBAGA1UE
+AxMJbG9jYWxob3N0MR0wGwYJKoZIhvcNAQkBFg5tYXJrQG15c3FsLmNvbTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK6Y+2ojlQYwwE+ebQ/DRVLhBN4U
+nHznPt7pg3FRzSGBGTn7AwZ9uKasFCCLCpCAHujkt4rC0gBduKYvZPsSA75/o8eh
+kbTHoNPZ6MCt5JPoCNoFKffamrSo9vIDWMF0lZu6Wqdeirmb6nATxgGRYxv2Amzk
+2pw+Ku489JoN4YYpTPRE5BzNqZBXQ+8X1zwdiMfCn/KLKK0hTxjqBAlQ7cKxfsEV
+HROvdKnuqo+tMkwYdxj9JPGBEqISPInvfY8HUGND1k9X5i6Nn2b8YKY5i+dWCMj5
+s9PG4gf0twOpXeYjojtUZUJH6xRok7iFnvtNAxKXA1id0IeDBV4K9UYX/ZECAwEA
+AaAAMA0GCSqGSIb3DQEBBAUAA4IBAQAEnnyg8NQVrvjkvGgtXrzNGV4gVMhTeLBO
+kb1njtvgePgTaOplMFnW/ZRysfHTFW+96gPzPAdzNHgdvbM1gmcYvmWdm0DbAu13
+VV7QU/9yfaspbuhgcFI/UP4IPe202NZRwJQmaiZmloI5PtUoHHDieybKdnu0yZKQ
+WLDE4DkvNjJ8XIG4C7SjjPauK9nQP0Gv7JUKpliR7Vc6bMUffxrtDgb+0MJw806l
+x20tA7x06sk49a4u0tQquRi1EMijIAVhMjbqZ4/aWzDuBSdCdMGNYEnZHELLe7Aq
+dqphd24vd+r4paQ9wFXxr71mXIlw1thWXkCwYNFUIj9Yo9v0ZTny
+-----END CERTIFICATE REQUEST-----

Added: trunk/connector-j/src/testsuite/ssl-test-certs/test-cert-store
===================================================================
(Binary files differ)


Property changes on: trunk/connector-j/src/testsuite/ssl-test-certs/test-cert-store
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Thread
Connector/J commit: r6335 - branches/branch_5_0/connector-j branches/branch_5_0/connector-j/src/com/mysql/jdbc branches/branch_5_0/connector-j/src/tes...mmatthews1 Mar