diff options
Diffstat (limited to 'src/keystore.cpp')
-rw-r--r-- | src/keystore.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp index 313518711b..bdeae30135 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -73,6 +73,20 @@ bool CCryptoKeyStore::SetCrypted() return true; } +bool CCryptoKeyStore::Lock() +{ + if (!SetCrypted()) + return false; + + { + LOCK(cs_KeyStore); + vMasterKey.clear(); + } + + NotifyStatusChanged(this); + return true; +} + bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) { { @@ -99,6 +113,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) } vMasterKey = vMasterKeyIn; } + NotifyStatusChanged(this); return true; } |