Commit 3bc97e95 authored by Victor Hong's avatar Victor Hong

Changed getClientIdentities and getServerIdentities to use the first non-empty mapping results

parent b90fd62c
...@@ -397,7 +397,10 @@ public class CertificateManager { ...@@ -397,7 +397,10 @@ public class CertificateManager {
for (CertificateIdentityMapping mapping : clientCertMapping) { for (CertificateIdentityMapping mapping : clientCertMapping) {
List<String> identities = mapping.mapIdentity(x509Certificate); List<String> identities = mapping.mapIdentity(x509Certificate);
Log.debug("CertificateManager: " + mapping.name() + " returned " + identities.toString()); Log.debug("CertificateManager: " + mapping.name() + " returned " + identities.toString());
names.addAll(identities); if (!identities.isEmpty()) {
names.addAll(identities);
break;
}
} }
return names; return names;
...@@ -420,7 +423,10 @@ public class CertificateManager { ...@@ -420,7 +423,10 @@ public class CertificateManager {
for (CertificateIdentityMapping mapping : serverCertMapping) { for (CertificateIdentityMapping mapping : serverCertMapping) {
List<String> identities = mapping.mapIdentity(x509Certificate); List<String> identities = mapping.mapIdentity(x509Certificate);
Log.debug("CertificateManager: " + mapping.name() + " returned " + identities.toString()); Log.debug("CertificateManager: " + mapping.name() + " returned " + identities.toString());
names.addAll(identities); if (!identities.isEmpty()) {
names.addAll(identities);
break;
}
} }
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