diff options
author | Vlastimil Zíma <vlastimil.zima@nic.cz> | 2019-01-08 15:20:09 +0100 |
---|---|---|
committer | Vlastimil Zíma <vlastimil.zima@nic.cz> | 2019-01-08 15:20:14 +0100 |
commit | c91131e427ff5a6b31fac888ee32ad70e6b020bc (patch) | |
tree | 43b26a251f9e03b0478271a0f6026a1bdee32b93 | |
parent | 50caa1b02bd39046dea48e00cbef3fa69f1d911f (diff) | |
download | openid-c91131e427ff5a6b31fac888ee32ad70e6b020bc.tar.gz |
Fix associate script for P3
-rwxr-xr-x | contrib/associate.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/associate.py b/contrib/associate.py index 221f1ab..d88b698 100755 --- a/contrib/associate.py +++ b/contrib/associate.py @@ -81,7 +81,7 @@ def strxor(x, y): def parse_kv_response(response): """Parse the key-value response.""" decoded_data = {} - for line in response.iter_lines(): + for line in response.text.splitlines(): line = line.strip() if not line: continue @@ -175,7 +175,7 @@ def establish_association(endpoint, assoc_type, session_type, generator, generat 'session_type': association_data['session_type'], 'assoc_handle': association_data['assoc_handle'], 'expires_in': association_data['expires_in'], - 'mac_key': base64.b64encode(mac_key)} + 'mac_key': base64.b64encode(mac_key).decode('utf-8')} def main(): |