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

Enhance sanity check for keys returned from getRequiredKey #83

@anguyenqd

Description

@anguyenqd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions