Commit 93ba9790 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Consider all CN values in subjectDN. JM-1384

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches@10497 b35dd754-fafc-0310-a699-88a17e54d16e
parent 9c107c1b
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* $Revision: $ * $Revision: $
* $Date: $ * $Date: $
* *
* Copyright (C) 2008 Jive Software. All rights reserved. * Copyright (C) 2005-2008 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution, or a commercial license * a copy of which is included in this distribution, or a commercial license
...@@ -174,12 +174,11 @@ public class CertificateManager { ...@@ -174,12 +174,11 @@ public class CertificateManager {
if (names.isEmpty()) { if (names.isEmpty()) {
String name = x509Certificate.getSubjectDN().getName(); String name = x509Certificate.getSubjectDN().getName();
Matcher matcher = cnPattern.matcher(name); Matcher matcher = cnPattern.matcher(name);
if (matcher.find()) { // Create an array with the detected identities
name = matcher.group(2);
}
// Create an array with the unique identity
names = new ArrayList<String>(); names = new ArrayList<String>();
names.add(name); while (matcher.find()) {
names.add(matcher.group(2));
}
} }
return names; return names;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment