don't need our pubkey for anything

This commit is contained in:
meejah 2018-08-03 15:13:30 -06:00
parent 2692c2caea
commit 36c471fdef
3 changed files with 12 additions and 5 deletions

View File

@ -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

View File

@ -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):

View File

@ -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