fixed e2ee traceback

This commit is contained in:
Brendan Taylor 2008-04-26 01:52:03 +00:00
parent 76808901eb
commit 051bd6e1b7

View file

@ -83,7 +83,7 @@ class StanzaSession(object):
def cancelled_negotiation(self):
'''A negotiation has been cancelled, so reset this session to its default state.'''
if hasattr(self, 'control'):
if self.control:
self.control.on_cancel_session_negotiation()
self.status = None
@ -778,7 +778,7 @@ class EncryptedStanzaSession(StanzaSession):
self.status = 'active'
self.enable_encryption = True
if hasattr(self, 'control'):
if self.control:
self.control.print_esession_details()
def final_steps_alice(self, form):
@ -798,8 +798,7 @@ class EncryptedStanzaSession(StanzaSession):
self.do_retained_secret(k, srs)
# don't need to calculate ks_s here
# ks_s doesn't need to be calculated here
self.kc_s, self.km_s, self.ks_s = self.generate_initiator_keys(k)
self.kc_o, self.km_o, self.ks_o = self.generate_responder_keys(k)
@ -814,7 +813,7 @@ class EncryptedStanzaSession(StanzaSession):
self.status = 'active'
self.enable_encryption = True
if hasattr(self, 'control'):
if self.control:
self.control.print_esession_details()
# calculate and store the new retained secret