From 793f36bb8063017cd8b48f084597f4e64b72d0f4 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 2 Oct 2012 15:52:48 +0200 Subject: use hexlify and unhexlify everywhere needed except the final auth as this is still broken anyway --- users/test/integration/api/python/flow_with_srp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'users/test') diff --git a/users/test/integration/api/python/flow_with_srp.py b/users/test/integration/api/python/flow_with_srp.py index cb89f6e..1aad555 100755 --- a/users/test/integration/api/python/flow_with_srp.py +++ b/users/test/integration/api/python/flow_with_srp.py @@ -40,11 +40,12 @@ def authenticate(session, login): uname, A = usr.start_authentication() params = { 'login': uname, - 'A': A + 'A': binascii.hexlify(A) } init = print_and_parse(session.post(server + '/sessions', data = params)) - M = usr.process_challenge( init['salt'], init['B'] ) - return session.put(server + '/sessions/' + login, data = {'client_auth': M}) + M = usr.process_challenge( binascii.unhexlify(init['salt']), binascii.unhexlify(init['B']) ) + return session.put(server + '/sessions/' + login, + data = {'client_auth': binascii.hexlify(M)}) session = requests.session() user = print_and_parse(signup(session)) -- cgit v1.2.3