Fix unlock code.
This commit is contained in:
parent
143e833a8d
commit
53158787b0
8
c_micasad/cache/SecretStore.cs
vendored
8
c_micasad/cache/SecretStore.cs
vendored
@ -97,20 +97,22 @@ namespace sscs.cache
|
|||||||
if (sDesktopPassword != null)
|
if (sDesktopPassword != null)
|
||||||
{
|
{
|
||||||
// verify Desktop password
|
// verify Desktop password
|
||||||
state = STATE_OK;
|
//state = STATE_OK;
|
||||||
return true;
|
//return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sMasterPassword != null)
|
if (sMasterPassword != null)
|
||||||
{
|
{
|
||||||
// verify MasterPassword
|
// verify MasterPassword
|
||||||
|
if (SetMasterPassword(sMasterPassword))
|
||||||
|
{
|
||||||
state = STATE_OK;
|
state = STATE_OK;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool StartPersistenceByDesktopPasswd(string desktopPasswd)
|
internal bool StartPersistenceByDesktopPasswd(string desktopPasswd)
|
||||||
|
@ -161,7 +161,7 @@ namespace sscs.verbs
|
|||||||
case MiCasaRequestReply.VERB_REMOVE_ALL_SECRETS:
|
case MiCasaRequestReply.VERB_REMOVE_ALL_SECRETS:
|
||||||
{
|
{
|
||||||
// stop persistence
|
// stop persistence
|
||||||
ssStore.StopPersistence();
|
//ssStore.StopPersistence();
|
||||||
|
|
||||||
// remove secrets
|
// remove secrets
|
||||||
return DoRemoveAllSecrets(ssStore, wo);
|
return DoRemoveAllSecrets(ssStore, wo);
|
||||||
@ -220,7 +220,8 @@ namespace sscs.verbs
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ssStore.UnlockStore("Desktop", "Master");
|
string sMasterPassword = (string)wo.GetObject();
|
||||||
|
ssStore.UnlockStore(null, sMasterPassword);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user