diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2011-07-03 15:33:01 +0200 |
---|---|---|
committer | Matt Corallo <matt@bluematt.me> | 2011-07-13 02:11:25 +0200 |
commit | 0efda1a79eab6dd2e101edc615c6dd14138c31a2 (patch) | |
tree | 948076f3e360c60969f298edc0e08bd74146b616 /src/keystore.cpp | |
parent | b6b039d84ed3d1616cb97ee45ff24ec343efbed0 (diff) |
Do not use obsolete CPrivKey for passing keys around
Diffstat (limited to 'src/keystore.cpp')
-rw-r--r-- | src/keystore.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp index f659495a1a..de13958a8b 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -100,7 +100,7 @@ bool CCryptoKeyStore::AddCryptedKey(const std::vector<unsigned char> &vchPubKey, return true; } -bool CCryptoKeyStore::GetPrivKey(const std::vector<unsigned char> &vchPubKey, CPrivKey& keyOut) const +bool CCryptoKeyStore::GetPrivKey(const std::vector<unsigned char> &vchPubKey, CKey& keyOut) const { CRITICAL_BLOCK(cs_vMasterKey) { @@ -114,9 +114,7 @@ bool CCryptoKeyStore::GetPrivKey(const std::vector<unsigned char> &vchPubKey, CP CSecret vchSecret; if (!DecryptSecret(vMasterKey, (*mi).second, Hash((*mi).first.begin(), (*mi).first.end()), vchSecret)) return false; - CKey key; - key.SetSecret(vchSecret); - keyOut = key.GetPrivKey(); + keyOut.SetSecret(vchSecret); return true; } } |