From c08f0f0b35aed1d6281623720f712e1124457b97 Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Tue, 2 May 2017 11:50:30 -0400 Subject: [PATCH] make sure we're dealing with keys of the same format when comparing --- blockstack_client/keys.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blockstack_client/keys.py b/blockstack_client/keys.py index 1bd1e76fd..55f6682c7 100644 --- a/blockstack_client/keys.py +++ b/blockstack_client/keys.py @@ -459,7 +459,7 @@ def get_data_privkey(user_zonefile, wallet_keys=None, config_path=CONFIG_PATH): data_privkey = wallet['data_privkey'] # NOTE: uncompresssed - wallet_data_pubkey = get_pubkey_hex(str(data_privkey)) + wallet_data_pubkey = keylib.key_formatting.decompress(get_pubkey_hex(str(data_privkey))) if zonefile_data_pubkey is None and wallet_data_pubkey is not None: # zone file does not have a data key set. @@ -471,10 +471,10 @@ def get_data_privkey(user_zonefile, wallet_keys=None, config_path=CONFIG_PATH): elif virtualchain.is_multisig(owner_privkey_info): owner_privkey = owner_privkey_info['private_keys'][0] - owner_pubkey = get_pubkey_hex(str(owner_privkey)) + owner_pubkey = keylib.key_formatting.decompress(get_pubkey_hex(str(owner_privkey))) if owner_pubkey != wallet_data_pubkey: # doesn't match. no data key - return {'error': 'No zone file key, and data key does not match owner key'} + return {'error': 'No zone file key, and data key does not match owner key ({} != {})'.format(owner_pubkey, wallet_data_pubkey)} return str(data_privkey)