Browse Source

signrawtransaction: validate private key.

0.13
Pavel Janík 10 years ago
parent
commit
aa768f1848
  1. 2
      src/rpcrawtransaction.cpp

2
src/rpcrawtransaction.cpp

@ -587,6 +587,8 @@ Value signrawtransaction(const Array& params, bool fHelp) @@ -587,6 +587,8 @@ Value signrawtransaction(const Array& params, bool fHelp)
if (!fGood)
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
CKey key = vchSecret.GetKey();
if (!key.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Private key outside allowed range");
tempKeystore.AddKey(key);
}
}

Loading…
Cancel
Save