From 36c471fdef25e67a9d0979bb87394ae6f0a5c742 Mon Sep 17 00:00:00 2001 From: meejah Date: Fri, 3 Aug 2018 15:13:30 -0600 Subject: [PATCH] don't need our pubkey for anything --- src/allmydata/client.py | 8 +++++--- src/allmydata/scripts/tahoe_grid_manager.py | 6 ++++++ src/allmydata/storage_client.py | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/allmydata/client.py b/src/allmydata/client.py index 478a3fc98..7d7723b6d 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -392,9 +392,11 @@ def create_storage_farm_broker(config, default_connection_handlers, foolscap_con keyutil.parse_pubkey(gm_key) ) - my_pubkey = keyutil.parse_pubkey( - self.get_config_from_file("node.pubkey") - ) + # we don't actually use this keypair for anything (yet) as far + # as I can see. + # my_pubkey = keyutil.parse_pubkey( + # self.get_config_from_file("node.pubkey") + # ) # create the actual storage-broker diff --git a/src/allmydata/scripts/tahoe_grid_manager.py b/src/allmydata/scripts/tahoe_grid_manager.py index 91dc4f890..01cb72356 100644 --- a/src/allmydata/scripts/tahoe_grid_manager.py +++ b/src/allmydata/scripts/tahoe_grid_manager.py @@ -249,6 +249,12 @@ class _GridManager(object): u"certificate": cert_data, u"signature": base32.b2a(sig), } + + if True: + verify_key_bytes = self._private_key.get_verifying_key_bytes() + vk = ed25519.VerifyingKey(verify_key_bytes) + assert vk.verify(sig, cert_data) is None, "cert should verify" + return certificate def add_storage_server(self, name, public_key): diff --git a/src/allmydata/storage_client.py b/src/allmydata/storage_client.py index dcf92a61c..33c72e5e2 100644 --- a/src/allmydata/storage_client.py +++ b/src/allmydata/storage_client.py @@ -74,14 +74,13 @@ class StorageFarmBroker(service.MultiService): I'm also responsible for subscribing to the IntroducerClient to find out about new servers as they are announced by the Introducer. """ - def __init__(self, permute_peers, tub_maker, preferred_peers=(), grid_manager_keys=[], node_pubkey=None): + def __init__(self, permute_peers, tub_maker, preferred_peers=(), grid_manager_keys=[]): service.MultiService.__init__(self) assert permute_peers # False not implemented yet self.permute_peers = permute_peers self._tub_maker = tub_maker self.preferred_peers = preferred_peers self._grid_manager_keys = grid_manager_keys - self._node_pubkey = node_pubkey # self.servers maps serverid -> IServer, and keeps track of all the # storage servers that we've heard about. Each descriptor manages its