chiark / gitweb /
server always mentions algorithm in client greeting
[disorder] / python / disorder.py.in
index 4e9b8cd8bc931bcc21af07ae40c95a2b5d4cec69..b18c7243ed0181a21f12584ee5b58cf3a07bc75f 100644 (file)
@@ -375,7 +375,8 @@ class client:
           s.connect(self.who)
         self.w = s.makefile("wb")
         self.r = s.makefile("rb")
-        (res, challenge) = self._simple()
+        (res, challenge_and_algo) = self._simple()
+        (algo, challenge) = _split(challenge_and_algo)
         if cookie is None:
           if self.user is None:
             user = self.config['username']
@@ -385,6 +386,7 @@ class client:
             password = self.config['password']
           else:
             password = self.password
+          # TODO support algorithms other than SHA-1
           h = sha.sha()
           h.update(password)
           h.update(binascii.unhexlify(challenge))