Skip to content

Commit

Permalink
[CONJ-737] sha256User testing correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Oct 15, 2019
1 parent 3d4586a commit e1b9d5a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/test/java/org/mariadb/jdbc/Sha256AuthenticationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,22 @@ public void checkSsl() throws SQLException {
// eat
}

stmt.execute("CREATE USER 'sha256User'@'%'");
stmt.execute(
"GRANT ALL PRIVILEGES ON *.* TO 'sha256User'@'%' IDENTIFIED WITH "
+ "sha256_password BY 'password'");
if (minVersion(8, 0, 0)) {

stmt.execute("CREATE USER 'cachingSha256User'@'%'");
stmt.execute(
"GRANT ALL PRIVILEGES ON *.* TO 'cachingSha256User'@'%' IDENTIFIED WITH "
+ "caching_sha2_password BY 'password'");
"CREATE USER 'sha256User'@'%' IDENTIFIED WITH sha256_password BY 'password'");
stmt.execute(
"GRANT ALL PRIVILEGES ON *.* TO 'sha256User'@'%'");
} else {
stmt.execute("CREATE USER 'sha256User'@'%'");
stmt.execute(
"GRANT ALL PRIVILEGES ON *.* TO 'sha256User'@'%' IDENTIFIED WITH "
+ "sha256_password BY 'password'");
}
if (minVersion(8, 0, 0)) {
stmt.execute(
"CREATE USER 'cachingSha256User'@'%' IDENTIFIED WITH caching_sha2_password BY 'password'");
stmt.execute(
"GRANT ALL PRIVILEGES ON *.* TO 'cachingSha256User'@'%'");
} else {
forceTls = "&enabledSslProtocolSuites=TLSv1.1";
}
Expand Down

0 comments on commit e1b9d5a

Please sign in to comment.