diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java index 8aeef556759..14abd734498 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java @@ -125,6 +125,7 @@ public class SslConnectionFactoryTest " cn= foo.bar , o=other ", "o=other,cn=foo.bar", " o=other , cn= foo.bar ", + "CN=foo.bar,O=other", }; for (String n:names) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/ExtendedSslContextFactory.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/ExtendedSslContextFactory.java index 95554fd1d8d..702fb8184cf 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/ExtendedSslContextFactory.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/ExtendedSslContextFactory.java @@ -55,7 +55,7 @@ import org.eclipse.jetty.util.log.Logger; public class ExtendedSslContextFactory extends SslContextFactory { static final Logger LOG = Log.getLogger(ExtendedSslContextFactory.class); - public final static Pattern __cnPattern = Pattern.compile(".*cn=\\h*([^,\\h]*).*"); + public final static Pattern __cnPattern = Pattern.compile(".*[cC][nN]=\\h*([^,\\h]*).*"); private final Map _aliases = new HashMap<>(); private boolean _useCipherSuitesOrder=true;