]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
node.py: use 'node.pem' for all nodes
authorBrian Warner <warner@allmydata.com>
Wed, 23 May 2007 19:48:52 +0000 (12:48 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 23 May 2007 19:48:52 +0000 (12:48 -0700)
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.

src/allmydata/client.py
src/allmydata/introducer_and_vdrive.py
src/allmydata/node.py

index 687c21f9e04c81703a48561a1920f4936f868bc2..e4e142c185e302ecf0a6f0833bed10ead6e52674 100644 (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"
index cfea26e27f7cd06344ac8b5019b306acfedf0ae7..506331a8c9e2540a2bdb71b13e38a28f75b2d009 100644 (file)
@@ -6,7 +6,6 @@ from allmydata.introducer import Introducer
 
 
 class IntroducerAndVdrive(node.Node):
-    CERTFILE = "introducer.pem"
     PORTNUMFILE = "introducer.port"
     NODETYPE = "introducer"
 
index 9bd220003185272b75bd92604019e55fa81a41fb..44b9d15fb4a8762c696ca4c5d1707e5706cc81f7 100644 (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)