|
@@ -404,11 +404,16 @@ class DirAuthConnection(network.ClientConnection):
|
|
|
self.sendmsg(DirAuthGetConsensusDiffMsg())
|
|
|
return self.consensus
|
|
|
|
|
|
- def getENDIVE(self):
|
|
|
+ def getendive(self):
|
|
|
self.endive = None
|
|
|
self.sendmsg(DirAuthGetENDIVEMsg())
|
|
|
return self.endive
|
|
|
|
|
|
+ def getendivediff(self):
|
|
|
+ self.endive = None
|
|
|
+ self.sendmsg(DirAuthGetENDIVEDiffMsg())
|
|
|
+ return self.endive
|
|
|
+
|
|
|
def receivedfromserver(self, msg):
|
|
|
if isinstance(msg, DirAuthConsensusMsg):
|
|
|
self.consensus = msg.consensus
|
|
@@ -416,6 +421,8 @@ class DirAuthConnection(network.ClientConnection):
|
|
|
self.consensus = msg.consensus
|
|
|
elif isinstance(msg, DirAuthENDIVEMsg):
|
|
|
self.endive = msg.endive
|
|
|
+ elif isinstance(msg, DirAuthENDIVEDiffMsg):
|
|
|
+ self.endive = msg.endive
|
|
|
else:
|
|
|
raise TypeError('Not a server-originating DirAuthNetMsg', msg)
|
|
|
|
|
@@ -565,6 +572,11 @@ class DirAuth(network.Server):
|
|
|
msgsize = replymsg.size()
|
|
|
self.perfstats.bytes_sent += msgsize
|
|
|
client.reply(replymsg)
|
|
|
+ elif isinstance(msg, DirAuthGetENDIVEDiffMsg):
|
|
|
+ replymsg = DirAuthENDIVEDiffMsg(DirAuth.endive)
|
|
|
+ msgsize = replymsg.size()
|
|
|
+ self.perfstats.bytes_sent += msgsize
|
|
|
+ client.reply(replymsg)
|
|
|
else:
|
|
|
raise TypeError('Not a client-originating DirAuthNetMsg', msg)
|
|
|
|