Author: steve-e Date: 2007-09-20 21:58:31 +0200 (Thu, 20 Sep 2007) New Revision: 8844
Modified: trunk/src/common/stanza_session.py Log: Adress some crypto functions correctly.
Modified: trunk/src/common/stanza_session.py =================================================================== --- trunk/src/common/stanza_session.py 2007-09-20 16:32:45 UTC (rev 8843) +++ trunk/src/common/stanza_session.py 2007-09-20 19:58:31 UTC (rev 8844) @@ -281,7 +281,7 @@ if (not 1 < e < (p - 1)): raise exceptions.NegotiationError, "invalid DH value"
- return self.sha256(self.encode_mpi(self.powmod(e, y, p))) + return crypto.sha256(crypto.encode_mpi(crypto.powmod(e, y, p)))
def c7lize_mac_id(self, form): kids = form.getChildren() @@ -741,7 +741,7 @@
# 4.5.5 if srs: - srshash = crypto.hmac(srs, 'Shared Retained Secret') + srshash = self.hmac(srs, 'Shared Retained Secret') else: srshash = crypto.random_bytes(32)