Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Enhance sanity check for keys returned from getRequiredKey #83

Open
anguyenqd opened this issue May 20, 2019 · 0 comments
Open

Enhance sanity check for keys returned from getRequiredKey #83

anguyenqd opened this issue May 20, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@anguyenqd
Copy link
Contributor

In TransactionProcessor#createSignatureRequest method, we have a sanity check whether the list of keys returned from backend by calling getRequiredKeys is a subset of provided available keys.

Check the part "Subset of keys returned in GetRequiredKeysResponse.requiredKeys ?" at
EOSIO-java v 1.7.1 - createSignatureRequest workflow.pdf

The problem happens when input user's SECP256K1 public key format in available keys is not the same with SECP256K1 public key format returned from backend. Example : EOSXXXX.. vs PUB_K1_XXXX. The sanity check will fail the process and throw exception because it is using String comparison.

So far, there are 2 solutions for that:

  • Remove the sanity check.
  • Enhance the sanity check by using PEM format comparison instead of String comparison.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant