Skip to content

Commit 04736f8

Browse files
authored
Update allowed error messages in SSL test (#115900)
Different JRE vendors/version produce slightly different error messages. We don't care which one we receive, just accept any of them. Resolves: #115016
1 parent f5cc243 commit 04736f8

File tree

1 file changed

+5
-1
lines changed
  • x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/nio

1 file changed

+5
-1
lines changed

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/nio/SSLDriverTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ public void testHandshakeFailureBecauseProtocolMismatch() throws Exception {
172172
serverProtocols = new String[] { "TLSv1.2" };
173173
clientProtocols = new String[] { "TLSv1.1" };
174174
expectedMessageMatcher = anyOf(
175-
is("The client supported protocol versions [TLSv1.1] are not accepted by server preferences " + "[TLS1.2]"),
175+
is("The client supported protocol versions [TLSv1.1] are not accepted by server preferences [TLS12]"),
176+
is("The client supported protocol versions [TLSv1.1] are not accepted by server preferences [TLS1.2]"),
177+
is("The client supported protocol versions [TLSv1.1] are not accepted by server preferences [TLSv1.2]"),
176178
is("org.bouncycastle.tls.TlsFatalAlert: protocol_version(70)"),
177179
is("Client requested protocol TLSv1.1 " + "not enabled or not supported")
178180
);
@@ -185,7 +187,9 @@ public void testHandshakeFailureBecauseProtocolMismatch() throws Exception {
185187
serverProtocols = new String[] { "TLSv1.2" };
186188
clientProtocols = new String[] { "TLSv1.1" };
187189
expectedMessageMatcher = anyOf(
190+
is("The client supported protocol versions [TLSv1.1] are not accepted by server preferences [TLS12]"),
188191
is("The client supported protocol versions [TLSv1.1] are not accepted by server preferences [TLS1.2]"),
192+
is("The client supported protocol versions [TLSv1.1] are not accepted by server preferences [TLSv1.2]"),
189193
is("Client requested protocol TLSv1.1 not enabled or not supported"),
190194
is("No appropriate protocol (protocol is disabled or cipher suites are inappropriate)")
191195
);

0 commit comments

Comments
 (0)