/*
- * Sone - IdentityManager.java - Copyright © 2010 David Roden
+ * WoTNS - IdentityManager.java - Copyright © 2010–2017 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* The Web of Trust connector
*/
public IdentityManager(WebOfTrustConnector webOfTrustConnector) {
- super("Sone Identity Manager", false);
+ super("WoTNS Identity Manager", false);
this.webOfTrustConnector = webOfTrustConnector;
}
*/
public Set<Identity> getTrustedIdentities(OwnIdentity ownIdentity) {
Set<Identity> identities = new HashSet<Identity>();
- if ((context == null) || ownIdentity.getContexts().contains(context)) {
- identities.add(ownIdentity);
+ for (OwnIdentity additionalOwnIdentity : getAllOwnIdentities()) {
+ if ((context == null) || additionalOwnIdentity.getContexts().contains(context)) {
+ identities.add(additionalOwnIdentity);
+ }
}
try {
Set<Identity> trustedIdentities = webOfTrustConnector.loadTrustedIdentities(ownIdentity, context);
protected void serviceRun() {
while (!shouldStop()) {
Map<OwnIdentity, Map<String, Identity>> currentIdentities = new HashMap<OwnIdentity, Map<String, Identity>>();
- @SuppressWarnings("hiding")
Map<String, OwnIdentity> currentOwnIdentities = new HashMap<String, OwnIdentity>();
Set<OwnIdentity> ownIdentities = null;
*/
private void checkTrustedIdentities(OwnIdentity ownIdentity, Map<String, Identity> trustedIdentities) {
- @SuppressWarnings("hiding")
Map<String, Identity> currentTrustedIdentities = new HashMap<String, Identity>();
synchronized (syncObject) {
if (this.currentTrustedIdentities.containsKey(ownIdentity)) {