Keyring: Separate local and remote dests on /configkeyring

Prohibit local changes on /configkeyring
Remove local keys from keyring on tunnel shutdown or encryption disable
Ensure subsession encryption setting matches primary session
(ticket #2108)
This commit is contained in:
zzz
2018-01-14 18:48:47 +00:00
parent 8ef042af6a
commit c2bfb80233
8 changed files with 69 additions and 12 deletions

View File

@@ -38,11 +38,12 @@ public class PersistentKeyRing extends KeyRing {
@Override
public SessionKey remove(Object o) {
if (o != null && o instanceof Hash) {
SessionKey rv = super.remove(o);
if (rv != null && o != null && o instanceof Hash) {
Hash h = (Hash) o;
_ctx.router().saveConfig(PROP_PFX + h.toBase64().replace("=", "$"), null);
}
return super.remove(o);
return rv;
}
private void addFromProperties() {

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 20;
public final static long BUILD = 21;
/** for example "-test" */
public final static String EXTRA = "";