Fix issue #5454. Validate private key is inside allowed range.
signrawtransaction: validate private key. #5461
pull paveljanik wants to merge 1 commits into bitcoin:master from paveljanik:signrawtransactiondos changing 1 files +2 −0-
paveljanik commented at 3:09 PM on December 11, 2014: contributor
-
signrawtransaction: validate private key. aa768f1848
- laanwj added the label Bug on Dec 11, 2014
- laanwj added the label RPC on Dec 11, 2014
-
sipa commented at 3:17 PM on December 11, 2014: member
utACK for 0.10 and master.
-
laanwj commented at 4:03 PM on December 11, 2014: member
Can you give a reproducible example of the crash?I just tried the following on testnet based on the command line of issue #5454, without this patchX=$(src/bitcoin-cli -testnet createrawtransaction "[{\"txid\":\"00000000faeea6702a677fdc53f80fa15c017a159674dcff285ada3017844327\",\"vout\":0}]" "{\"muwmUMjAuMQYNZtr4kLKcUjXUe1rrGgne7\":0.01}") src/bitcoin-cli -testnet signrawtransaction $X '[]' '["5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU"]'This gives the output:error: {"code":-5,"message":"Invalid private key"}Edit: doh, managed to reproduce it, privkeys have a different marker byte on testnet and mainnet, if you use
91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwi1C2GDit reproduces -
gmaxwell commented at 10:15 AM on December 12, 2014: contributor
ACK
-
jtimon commented at 10:28 AM on December 12, 2014: contributor
utACK
- laanwj merged this on Dec 12, 2014
- laanwj closed this on Dec 12, 2014
- laanwj referenced this in commit 5f7279ac70 on Dec 12, 2014
- laanwj referenced this in commit 44b4c0d8a9 on Dec 12, 2014
- paveljanik deleted the branch on Dec 13, 2014
- reddink referenced this in commit 4a5511c7ad on May 27, 2020
- fanquake deleted a comment on Nov 29, 2020
- fanquake locked this on Nov 29, 2020