mirror of https://github.com/nucypher/nucypher.git
Merge pull request #780 from itmustbejj/fix_alice_cli_derive_policy_pubkey
Update cli/alice.py to use new format for the /derive_policy_pubkey e…pull/792/head
commit
bd77bf5f77
|
@ -20,11 +20,11 @@ from nucypher.config.constants import GLOBAL_DOMAIN
|
||||||
|
|
||||||
ALICE_BANNER = r"""
|
ALICE_BANNER = r"""
|
||||||
|
|
||||||
/ \ | (_) ___ ___
|
/ \ | (_) ___ ___
|
||||||
/ _ \ | | |/ __/ _ \
|
/ _ \ | | |/ __/ _ \
|
||||||
/ ___ \| | | (_| __/
|
/ ___ \| | | (_| __/
|
||||||
/_/ \_|_|_|\___\___|
|
/_/ \_|_|_|\___\___|
|
||||||
|
|
||||||
the Authority.
|
the Authority.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -209,10 +209,7 @@ def alice(click_config,
|
||||||
return
|
return
|
||||||
|
|
||||||
elif action == "derive-policy":
|
elif action == "derive-policy":
|
||||||
request_data = {
|
response = requests.post(f'http://localhost:{http_port}/derive_policy_pubkey/{label}')
|
||||||
'label': b64encode(bytes(label, encoding='utf-8')).decode(),
|
|
||||||
}
|
|
||||||
response = requests.post(f'http://localhost:{http_port}/derive_policy_pubkey', data=json.dumps(request_data))
|
|
||||||
|
|
||||||
response_data = response.json()
|
response_data = response.json()
|
||||||
policy_encrypting_key = response_data['result']['policy_encrypting_pubkey']
|
policy_encrypting_key = response_data['result']['policy_encrypting_pubkey']
|
||||||
|
|
Loading…
Reference in New Issue