From 53158787b09ce618201139b6270c47cae84fbd13 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Thu, 13 Oct 2005 18:22:04 +0000 Subject: [PATCH] Fix unlock code. --- c_micasad/cache/SecretStore.cs | 12 +++++++----- c_micasad/verbs/ObjectSerialization.cs | 5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/c_micasad/cache/SecretStore.cs b/c_micasad/cache/SecretStore.cs index 086e09c8..afee87c4 100644 --- a/c_micasad/cache/SecretStore.cs +++ b/c_micasad/cache/SecretStore.cs @@ -97,20 +97,22 @@ namespace sscs.cache if (sDesktopPassword != null) { // verify Desktop password - state = STATE_OK; - return true; + //state = STATE_OK; + //return true; } if (sMasterPassword != null) { // verify MasterPassword - state = STATE_OK; - return true; + if (SetMasterPassword(sMasterPassword)) + { + state = STATE_OK; + return true; + } } return false; - } internal bool StartPersistenceByDesktopPasswd(string desktopPasswd) diff --git a/c_micasad/verbs/ObjectSerialization.cs b/c_micasad/verbs/ObjectSerialization.cs index 7369fd33..f8dd7094 100644 --- a/c_micasad/verbs/ObjectSerialization.cs +++ b/c_micasad/verbs/ObjectSerialization.cs @@ -161,7 +161,7 @@ namespace sscs.verbs case MiCasaRequestReply.VERB_REMOVE_ALL_SECRETS: { // stop persistence - ssStore.StopPersistence(); + //ssStore.StopPersistence(); // remove secrets return DoRemoveAllSecrets(ssStore, wo); @@ -220,7 +220,8 @@ namespace sscs.verbs { try { - ssStore.UnlockStore("Desktop", "Master"); + string sMasterPassword = (string)wo.GetObject(); + ssStore.UnlockStore(null, sMasterPassword); } catch (Exception e) {