This commit is contained in:
Jim Norman
2005-12-20 17:41:46 +00:00
parent 8439dee118
commit b1283d3b62
3 changed files with 30 additions and 13 deletions

View File

@@ -207,12 +207,20 @@ namespace sscs.verbs
private WrappedObject DoRemoveAllSecrets(SecretStore ssStore, WrappedObject wo)
{
string sKeyChainID = wo.GetKeychainID();
if (sKeyChainID != null)
if (!ssStore.IsStoreLocked())
{
KeyChain kc = ssStore.GetKeyChain(sKeyChainID);
kc.RemoveAllSecrets();
ssStore.UpdatePersistentStore();
string sKeyChainID = wo.GetKeychainID();
if (sKeyChainID != null)
{
KeyChain kc = ssStore.GetKeyChain(sKeyChainID);
kc.RemoveAllSecrets();
ssStore.UpdatePersistentStore();
}
}
else
{
wo.SetError(constants.RetCodes.FAILURE, "Store locked");
}
return wo;