1
0
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:
Pavol Rusnak 2014-12-20 00:49:14 +01:00
parent 10a92c3c62
commit c6ca89a850

View File

@ -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;