Fix for Zen/Security issue, MasterPassword on Windows is optional by a setting in the Registry.
This commit is contained in:
parent
b83f659d48
commit
487efaec37
21
CASA/micasad/cache/SecretStore.cs
vendored
21
CASA/micasad/cache/SecretStore.cs
vendored
@ -898,7 +898,7 @@ namespace sscs.cache
|
||||
mpWatcher.resumeWatcher();
|
||||
}
|
||||
|
||||
internal Secret GetDesktopSecret()
|
||||
internal Secret GetDesktopSecret(bool bCreateIfNeeded)
|
||||
{
|
||||
if (common.CSSSUtils.StoreDesktopPasswordInCache())
|
||||
{
|
||||
@ -914,11 +914,18 @@ namespace sscs.cache
|
||||
return secret;
|
||||
}
|
||||
catch (SecretNotFoundException e)
|
||||
{
|
||||
CSSSLogger.DbgLog("Desktop password not found in cache, creating one");
|
||||
secret = new Secret(ConstStrings.MICASA_DESKTOP_PASSWD);
|
||||
keyChain.AddSecret(secret);
|
||||
return secret;
|
||||
{
|
||||
if (bCreateIfNeeded)
|
||||
{
|
||||
CSSSLogger.DbgLog("Desktop password not found in cache, creating one");
|
||||
secret = new Secret(ConstStrings.MICASA_DESKTOP_PASSWD);
|
||||
keyChain.AddSecret(secret);
|
||||
return secret;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
@ -942,7 +949,7 @@ namespace sscs.cache
|
||||
{
|
||||
try
|
||||
{
|
||||
Secret secret = GetDesktopSecret();
|
||||
Secret secret = GetDesktopSecret(false);
|
||||
if (secret != null)
|
||||
{
|
||||
string passwd = secret.GetKeyValue(ConstStrings.MICASA_DESKTOP_PASSWD_KEYNAME).GetValue();
|
||||
|
@ -208,7 +208,7 @@ namespace sscs.verbs
|
||||
|
||||
if (ConstStrings.MICASA_DESKTOP_PASSWD == secretId)
|
||||
{
|
||||
secret = ssStore.GetDesktopSecret();
|
||||
secret = ssStore.GetDesktopSecret(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user