diff options
author | Azul <azul@leap.se> | 2012-10-02 15:52:48 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-10-02 15:52:48 +0200 |
commit | 793f36bb8063017cd8b48f084597f4e64b72d0f4 (patch) | |
tree | 50860e79dd8601e5be3a3843817eabef5935fef3 /users/test/integration/api/python | |
parent | c7d473882a01981ff6ff8f0e2b5c120a0026a531 (diff) |
use hexlify and unhexlify everywhere needed
except the final auth as this is still broken anyway
Diffstat (limited to 'users/test/integration/api/python')
-rwxr-xr-x | users/test/integration/api/python/flow_with_srp.py | 7 |
1 files changed, 4 insertions, 3 deletions
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)) |