Commit 54a6004c authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1327: A Map of Strings cannot contain a Principal.

parent 6b006670
......@@ -800,7 +800,7 @@ public class CertificateManager {
*/
private static Map<String, List<X509Certificate>> getCertsByIssuer(KeyStore ks)
throws Exception {
Map<String, List<X509Certificate>> answer = new HashMap<>();
Map<Principal, List<X509Certificate>> answer = new HashMap<>();
Enumeration<String> aliases = ks.aliases();
while (aliases.hasMoreElements()) {
String alias = aliases.nextElement();
......@@ -817,10 +817,17 @@ public class CertificateManager {
vec.add(cert);
}
}
answer.put(subjectDN.getName(), vec);
answer.put(subjectDN, vec);
}
}
return answer;
// Compare by principal, but return by principal name.
final Map<String, List<X509Certificate>> result = new HashMap<>();
for ( Map.Entry<Principal, List<X509Certificate>> entry : answer.entrySet() )
{
result.put( entry.getKey().getName(), entry.getValue() );
}
return result;
}
/**
......
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