Skip to content

Commit

Permalink
signature fix from dreamwatcher
Browse files Browse the repository at this point in the history
corrects issue with qt to allow signature verification
  • Loading branch information
cinnamoncoin committed Sep 4, 2014
1 parent bd9a439 commit 9a05be6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
11 changes: 1 addition & 10 deletions Electron-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,7 @@ CONFIG += thread
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively

BOOST_LIB_SUFFIX=
BOOST_INCLUDE_PATH=C:\deps\boost_1_55_0
BOOST_LIB_PATH=C:\deps\boost_1_55_0\stage\lib
BDB_INCLUDE_PATH=C:\deps\db-4.8.30.NC\build_unix
BDB_LIB_PATH=C:\deps\db-4.8.30.NC\build_unix
OPENSSL_INCLUDE_PATH=C:\deps\openssl-1.0.1g\include
OPENSSL_LIB_PATH=C:\deps\openssl-1.0.1g
MINIUPNPC_LIB_SUFFIX=-miniupnpc
MINIUPNPC_INCLUDE_PATH=C:\deps\miniupnpc
MINIUPNPC_LIB_PATH=C:\deps\miniupnpc


OBJECTS_DIR = build
MOC_DIR = build
Expand Down
6 changes: 3 additions & 3 deletions src/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ Value signmessage(const Array& params, bool fHelp)
if (!pwalletMain->GetKey(keyID, key))
throw JSONRPCError(RPC_WALLET_ERROR, "Private key not available");

CHashWriter ss(SER_GETHASH, 0);
CDataStream ss(SER_GETHASH, 0);
ss << strMessageMagic;
ss << strMessage;

vector<unsigned char> vchSig;
if (!key.SignCompact(ss.GetHash(), vchSig))
std::vector<unsigned char> vchSig;
if (!key.SignCompact(Hashblake(ss.begin(), ss.end()), vchSig))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Sign failed");

return EncodeBase64(&vchSig[0], vchSig.size());
Expand Down

0 comments on commit 9a05be6

Please sign in to comment.