From f5971eaa3054f89d606461b9e8a5767631e8e4d9 Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Thu, 20 Sep 2007 19:58:31 +0000 Subject: [PATCH] Adress some crypto functions correctly. --- src/common/stanza_session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/stanza_session.py b/src/common/stanza_session.py index 8110d446d..834223fa5 100644 --- a/src/common/stanza_session.py +++ b/src/common/stanza_session.py @@ -281,7 +281,7 @@ class EncryptedStanzaSession(StanzaSession): 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 @@ class EncryptedStanzaSession(StanzaSession): # 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)