Skip to content

Commit

Permalink
[misc] test addition using wrongly client certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Mar 9, 2022
1 parent d121858 commit a370827
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/java/org/mariadb/jdbc/integration/SslTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@ public void certificateMandatorySsl() throws Throwable {
assertNotNull(getSslVersion(con));
}

if (System.getenv("TEST_DB_CLIENT_CERT") != null) {
assertThrowsContains(
SQLException.class,
() ->
createCon(
baseOptions
+ "&sslMode=VERIFY_FULL&serverSslCert="
+ System.getenv("TEST_DB_CLIENT_CERT"),
sslPort),
"aa");
}

Configuration conf = Configuration.parse(mDefUrl);
HostAddress hostAddress = conf.addresses().get(0);
try {
Expand Down

0 comments on commit a370827

Please sign in to comment.