aboutsummaryrefslogtreecommitdiff
path: root/src/keystore.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-05-20 01:53:24 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2012-05-20 01:53:24 -0700
commit5a8398e55a5f2bc0ce95c1e5da06c11365af0764 (patch)
tree4ad01e70d94768977f25a0129255ec3c84635f2e /src/keystore.cpp
parent563f3efda3d3230bc512b35f15598d5e4e3a5071 (diff)
parent239c11d0dd4287e74286c40fb338aea85f4b1996 (diff)
Merge pull request #1205 from laanwj/2012_05_granular_ui_notifications
Finer-grained UI updates, move UI interface to boost::signals
Diffstat (limited to 'src/keystore.cpp')
-rw-r--r--src/keystore.cpp15
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;
}