430951 Support SNI with ExtendedSslContextFactory

case insensitive CN
This commit is contained in:
Greg Wilkins 2015-04-20 10:14:40 +10:00
parent ae31162669
commit 12a9c0578e
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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<String,String> _aliases = new HashMap<>();
private boolean _useCipherSuitesOrder=true;