Skip to content

Commit

Permalink
Fix for tests failing due to using deprecated cipher suites.
Browse files Browse the repository at this point in the history
Change-Id: I72d24276dd854bc0bc38c247182cc2be13f5e514
  • Loading branch information
fjssilva committed Sep 11, 2023
1 parent 4f70ec3 commit e18e626
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 63 deletions.
8 changes: 4 additions & 4 deletions src/test/java/testsuite/simple/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2292,19 +2292,19 @@ public void testTLSVersionRemoval() throws Exception {

// TS.FR.2_1. Create a Connection with the connection property tlsCiphersuites=[valid-cipher-suite]. Assess that the connection is created successfully
// and it is using the cipher suite specified.
props.setProperty(PropertyKey.tlsCiphersuites.getKeyName(), "TLS_DHE_RSA_WITH_AES_128_CBC_SHA");
props.setProperty(PropertyKey.tlsCiphersuites.getKeyName(), "TLS_AES_256_GCM_SHA384");
con = getConnectionWithProps(props);
assertTrue(((MysqlConnection) con).getSession().isSSLEstablished());
assertSessionStatusEquals(con.createStatement(), "ssl_cipher", "DHE-RSA-AES128-SHA");
assertSessionStatusEquals(con.createStatement(), "ssl_cipher", "TLS_AES_256_GCM_SHA384");
con.close();

// TS.FR.2_2. Create a Connection with the connection property enabledSSLCipherSuites=[valid-cipher-suite] . Assess that the connection is created
// successfully and it is using the cipher suite specified.
props.remove(PropertyKey.tlsCiphersuites.getKeyName());
props.setProperty("enabledSSLCipherSuites", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA");
props.setProperty("enabledSSLCipherSuites", "TLS_AES_256_GCM_SHA384");
con = getConnectionWithProps(props);
assertTrue(((MysqlConnection) con).getSession().isSSLEstablished());
assertSessionStatusEquals(con.createStatement(), "ssl_cipher", "DHE-RSA-AES128-SHA");
assertSessionStatusEquals(con.createStatement(), "ssl_cipher", "TLS_AES_256_GCM_SHA384");
con.close();
props.remove("enabledSSLCipherSuites");

Expand Down
Loading

0 comments on commit e18e626

Please sign in to comment.