From: Brian Warner Date: Sun, 14 Apr 2013 21:03:34 +0000 (-0700) Subject: client.py: remove the old "server.privkey" fallback X-Git-Tag: allmydata-tahoe-1.10b1~7 X-Git-Url: https://git.rkrishnan.org/pf/content/en/footer/status?a=commitdiff_plain;h=e706156323354c8e3135539a662eaf8b0314cfdc;p=tahoe-lafs%2Ftahoe-lafs.git client.py: remove the old "server.privkey" fallback For a brief while (in between releases 1.9 and 1.10, specifically from revision bc21726 on 12-Mar-2012, until bf416af on 10-Jun-2012), the new introducer code stored its node key in NODEDIR/private/server.privkey . After that point, it was updated to store this key in NODEDIR/private/node.privkey instead. Fallback code was added to read from the old location if present (so that folks using development versions could keep their node keys after the bf416af change). This patch removes the fallback code. If you have a node which was run under a version of Tahoe within this range, you need to manually update your node by running: mv NODEDIR/private/server.privkey NODEDIR/private/node.privkey and then restart the node. If you accidentally start an older node with code after this patch, it will create a new key (and other peers will think a new server has appeared). You can either stick with the new key, or use the command above to switch back to the old key. See docs/nodekeys.rst (not yet written) for details about the node key and how it is used. --- diff --git a/src/allmydata/client.py b/src/allmydata/client.py index a1e99d9d..0fd15733 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -215,12 +215,7 @@ class Client(node.Node, pollmixin.PollMixin): def _make_key(): sk_vs,vk_vs = keyutil.make_keypair() return sk_vs+"\n" - # for a while (between releases, before 1.10) this was known as - # server.privkey, but now it lives in node.privkey. This fallback can - # be removed after 1.10 is released. - sk_vs = self.get_private_config("server.privkey", None) - if not sk_vs: - sk_vs = self.get_or_create_private_config("node.privkey", _make_key) + sk_vs = self.get_or_create_private_config("node.privkey", _make_key) sk,vk_vs = keyutil.parse_privkey(sk_vs.strip()) self.write_config("node.pubkey", vk_vs+"\n") self._node_key = sk