1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

multisig: allow mismatched change addresses, show them as non-change

This commit is contained in:
Pavol Rusnak 2017-05-06 19:52:49 +02:00
parent 4343d0eaeb
commit 261b8d5e41
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -510,14 +510,11 @@ static bool signing_check_output(TxOutputType *txoutput) {
}
if (txoutput->script_type == OutputScriptType_PAYTOMULTISIG) {
uint8_t h[32];
if (!multisig_fp_set || multisig_fp_mismatch
|| cryptoMultisigFingerprint(&(txoutput->multisig), h) == 0
|| memcmp(multisig_fp, h, 32) != 0) {
fsm_sendFailure(FailureType_Failure_Other, "Invalid multisig change address");
signing_abort();
return false;
if (multisig_fp_set && !multisig_fp_mismatch
&& cryptoMultisigFingerprint(&(txoutput->multisig), h)
&& memcmp(multisig_fp, h, 32) == 0) {
is_change = check_change_bip32_path(txoutput);
}
is_change = check_change_bip32_path(txoutput);
} else if (txoutput->script_type == OutputScriptType_PAYTOADDRESS
|| ((txoutput->script_type == OutputScriptType_PAYTOWITNESS
|| txoutput->script_type == OutputScriptType_PAYTOP2SHWITNESS)