Skip to content

Commit

Permalink
Add channel closed to allowable failures for bad client certificates
Browse files Browse the repository at this point in the history
According to mainline driver tests this is a somewhate expected error.
  • Loading branch information
kdubb committed Oct 28, 2020
1 parent b8cf3b0 commit b01be97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private static Collection<Object[]> testData(Properties prop, String param) {
static {
String PG_HBA_ON = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL on(?s-d:.*)";
String PG_HBA_OFF = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL off(?s-d:.*)";
String BROKEN = "Connection Error: SSL Error: Received fatal alert: unknown_ca";
String BROKEN = "Connection Error: (Channel Closed|SSL Error: Received fatal alert: unknown_ca)";
String ANY = ".*";
String VALIDATOR = "Connection Error: SSL Error: PKIX path (building|validation) failed:.*";
String HOSTNAME = "Connection Error: SSL Error: Hostname .* could not be verified";
Expand Down
4 changes: 2 additions & 2 deletions driver/src/test/java/com/impossibl/postgres/jdbc/SSLTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected void driver(String connstr, Object[] expected) {
else {
StringWriter trace = new StringWriter();
ex.printStackTrace(new PrintWriter(trace));
assertTrue("Unexpected Exception Message: " + ex.getMessage() + "\nfrom\n" + trace.toString(), ex.getMessage().matches(exmsg));
assertTrue("Unexpected Exception Message: " + ex.getMessage() + "\nexpected: " + exmsg + "\nfrom\n" + trace.toString(), ex.getMessage().matches(exmsg));
}
}
}
Expand Down Expand Up @@ -209,7 +209,7 @@ private static Collection<Object[]> testData(Properties prop, String param) thro
static {
String PG_HBA_ON = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL on(?s-d:.*)";
String PG_HBA_OFF = "Connection Error: no pg_hba.conf entry for host .*, user .*, database .*, SSL off(?s-d:.*)";
String BROKEN = "Connection Error: SSL Error: Received fatal alert: unknown_ca";
String BROKEN = "Connection Error: (Channel Closed|SSL Error: Received fatal alert: unknown_ca)";
String ANY = ".*";
String VALIDATOR = "Connection Error: SSL Error: PKIX path (building|validation) failed:.*";
String HOSTNAME = "Connection Error: SSL Error: Hostname .* could not be verified";
Expand Down

0 comments on commit b01be97

Please sign in to comment.