From 65738e770fefc7a0bf2214a6c2a59dc01456c0ff Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 2 Dec 2019 16:00:37 -0600 Subject: [PATCH] Issue #4385 - Fixing client testcase assertion Signed-off-by: Joakim Erdfelt --- .../src/test/java/org/eclipse/jetty/util/ssl/X509Test.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java b/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java index 0faf28eb38d6..f5e649eb0a6a 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java @@ -184,8 +184,8 @@ public void testSniX509ExtendedKeyManager_ClientClass() throws Exception { SslContextFactory clientSsl = new SslContextFactory.Client(); X509ExtendedKeyManager x509ExtendedKeyManager = getX509ExtendedKeyManager(clientSsl); - X509ExtendedKeyManager sniX509ExtendedKeyManager = clientSsl.newSniX509ExtendedKeyManager(x509ExtendedKeyManager); - assertThat("SNI X509 ExtendedKeyManager is undefined in Client mode", sniX509ExtendedKeyManager, is(x509ExtendedKeyManager)); + UnsupportedOperationException npe = assertThrows(UnsupportedOperationException.class, () -> clientSsl.newSniX509ExtendedKeyManager(x509ExtendedKeyManager)); + assertThat("SNI X509 ExtendedKeyManager is unsupported in Client mode", npe.getMessage(), containsString("X509ExtendedKeyManager only supported on " + SslContextFactory.Server.class.getName())); } @Test