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.h | |
parent | b6b039d84ed3d1616cb97ee45ff24ec343efbed0 (diff) |
Do not use obsolete CPrivKey for passing keys around
Diffstat (limited to 'src/keystore.h')
-rw-r--r-- | src/keystore.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keystore.h b/src/keystore.h index 8d445befea..0dc09f05b8 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -13,7 +13,7 @@ public: virtual bool AddKey(const CKey& key) =0; virtual bool HaveKey(const std::vector<unsigned char> &vchPubKey) const =0; - virtual bool GetPrivKey(const std::vector<unsigned char> &vchPubKey, CPrivKey& keyOut) const =0; + virtual bool GetPrivKey(const std::vector<unsigned char> &vchPubKey, CKey& keyOut) const =0; virtual std::vector<unsigned char> GenerateNewKey(); }; @@ -30,12 +30,12 @@ public: { return (mapKeys.count(vchPubKey) > 0); } - bool GetPrivKey(const std::vector<unsigned char> &vchPubKey, CPrivKey& keyOut) const + bool GetPrivKey(const std::vector<unsigned char> &vchPubKey, CKey& keyOut) const { std::map<std::vector<unsigned char>, CPrivKey>::const_iterator mi = mapKeys.find(vchPubKey); if (mi != mapKeys.end()) { - keyOut = (*mi).second; + keyOut.SetPrivKey((*mi).second); return true; } return false; @@ -109,7 +109,7 @@ public: return CBasicKeyStore::HaveKey(vchPubKey); return mapCryptedKeys.count(vchPubKey) > 0; } - bool GetPrivKey(const std::vector<unsigned char> &vchPubKey, CPrivKey& keyOut) const; + bool GetPrivKey(const std::vector<unsigned char> &vchPubKey, CKey& keyOut) const; }; #endif |