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:
Brian Warner 2007-05-23 12:48:52 -07:00
parent 9edc6574ae
commit f9e45391f6
3 changed files with 1 additions and 4 deletions

View File

@ -19,7 +19,6 @@ from allmydata.introducer import IntroducerClient
class Client(node.Node, Referenceable):
implements(RIClient)
CERTFILE = "client.pem"
PORTNUMFILE = "client.port"
STOREDIR = 'storage'
NODETYPE = "client"

View File

@ -6,7 +6,6 @@ from allmydata.introducer import Introducer
class IntroducerAndVdrive(node.Node):
CERTFILE = "introducer.pem"
PORTNUMFILE = "introducer.port"
NODETYPE = "introducer"

View File

@ -21,7 +21,7 @@ class Node(service.MultiService):
# nodes, and Vdrive nodes
NODETYPE = "unknown NODETYPE"
PORTNUMFILE = None
CERTFILE = None
CERTFILE = "node.pem"
LOCAL_IP_FILE = "advertised_ip_addresses"
NODEIDFILE = "my_nodeid"
@ -29,7 +29,6 @@ class Node(service.MultiService):
service.MultiService.__init__(self)
self.basedir = os.path.abspath(basedir)
self._tub_ready_observerlist = observer.OneShotObserverList()
assert self.CERTFILE, "Your node.Node subclass must provide CERTFILE"
certfile = os.path.join(self.basedir, self.CERTFILE)
self.tub = Tub(certFile=certfile)
self.tub.setOption("logLocalFailures", True)