mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-29 08:40:57 +00:00
simplify check in hdnode_from_xpub
This commit is contained in:
parent
10a92c3c62
commit
c6ca89a850
3
bip32.c
3
bip32.c
@ -33,8 +33,7 @@
|
||||
|
||||
int hdnode_from_xpub(uint32_t depth, uint32_t fingerprint, uint32_t child_num, const uint8_t *chain_code, const uint8_t *public_key, HDNode *out)
|
||||
{
|
||||
curve_point c;
|
||||
if (!ecdsa_read_pubkey(public_key, &c)) { // invalid pubkey
|
||||
if (public_key[0] != 0x02 && public_key[0] != 0x03) { // invalid pubkey
|
||||
return 0;
|
||||
}
|
||||
out->depth = depth;
|
||||
|
Loading…
Reference in New Issue
Block a user