Correctly detect exeception cause when using BoringSSL in SslErrorTest

Motivation:

e9ce5048df added a testcase to ensure we correctly send the alert in all cases but did use a too strict message matching which did not work for BoringSSL as it not uses whitespaces but underscores.

Modifications:

Make the message matching less strict.

Result:

Test pass also when using BoringSSL.
This commit is contained in:
Norman Maurer 2019-03-22 15:44:14 +01:00
parent 1e8a533ef9
commit d3535d31be

View File

@ -290,7 +290,7 @@ public class SslErrorTest {
// When the error is produced on the client side and the client side uses JDK as provider it will always
// use "certificate unknown".
!serverProduceError && clientProvider == SslProvider.JDK &&
message.toLowerCase(Locale.UK).contains("certificate unknown")) {
message.toLowerCase(Locale.UK).contains("unknown")) {
promise.setSuccess(null);
} else {
Throwable error = new AssertionError("message not contains '" + messagePart + "': " + message);