mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-19 07:48:11 +00:00
node.py: use 'node.pem' for all nodes
Rather than use separate client.pem and introducer.pem files, use 'node.pem' for all nodes regardless of what type it is. This is slightly cleaner, but introduces a compatibility. Users who upgrade to this change should do 'mv client.pem node.pem' to avoid generating a new certificate and thus changing their TubID.
This commit is contained in:
@ -19,7 +19,6 @@ from allmydata.introducer import IntroducerClient
|
|||||||
|
|
||||||
class Client(node.Node, Referenceable):
|
class Client(node.Node, Referenceable):
|
||||||
implements(RIClient)
|
implements(RIClient)
|
||||||
CERTFILE = "client.pem"
|
|
||||||
PORTNUMFILE = "client.port"
|
PORTNUMFILE = "client.port"
|
||||||
STOREDIR = 'storage'
|
STOREDIR = 'storage'
|
||||||
NODETYPE = "client"
|
NODETYPE = "client"
|
||||||
|
@ -6,7 +6,6 @@ from allmydata.introducer import Introducer
|
|||||||
|
|
||||||
|
|
||||||
class IntroducerAndVdrive(node.Node):
|
class IntroducerAndVdrive(node.Node):
|
||||||
CERTFILE = "introducer.pem"
|
|
||||||
PORTNUMFILE = "introducer.port"
|
PORTNUMFILE = "introducer.port"
|
||||||
NODETYPE = "introducer"
|
NODETYPE = "introducer"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class Node(service.MultiService):
|
|||||||
# nodes, and Vdrive nodes
|
# nodes, and Vdrive nodes
|
||||||
NODETYPE = "unknown NODETYPE"
|
NODETYPE = "unknown NODETYPE"
|
||||||
PORTNUMFILE = None
|
PORTNUMFILE = None
|
||||||
CERTFILE = None
|
CERTFILE = "node.pem"
|
||||||
LOCAL_IP_FILE = "advertised_ip_addresses"
|
LOCAL_IP_FILE = "advertised_ip_addresses"
|
||||||
NODEIDFILE = "my_nodeid"
|
NODEIDFILE = "my_nodeid"
|
||||||
|
|
||||||
@ -29,7 +29,6 @@ class Node(service.MultiService):
|
|||||||
service.MultiService.__init__(self)
|
service.MultiService.__init__(self)
|
||||||
self.basedir = os.path.abspath(basedir)
|
self.basedir = os.path.abspath(basedir)
|
||||||
self._tub_ready_observerlist = observer.OneShotObserverList()
|
self._tub_ready_observerlist = observer.OneShotObserverList()
|
||||||
assert self.CERTFILE, "Your node.Node subclass must provide CERTFILE"
|
|
||||||
certfile = os.path.join(self.basedir, self.CERTFILE)
|
certfile = os.path.join(self.basedir, self.CERTFILE)
|
||||||
self.tub = Tub(certFile=certfile)
|
self.tub = Tub(certFile=certfile)
|
||||||
self.tub.setOption("logLocalFailures", True)
|
self.tub.setOption("logLocalFailures", True)
|
||||||
|
Reference in New Issue
Block a user