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
11
CASA/micasad/cache/SecretStore.cs
vendored
11
CASA/micasad/cache/SecretStore.cs
vendored
@ -898,7 +898,7 @@ namespace sscs.cache
|
|||||||
mpWatcher.resumeWatcher();
|
mpWatcher.resumeWatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Secret GetDesktopSecret()
|
internal Secret GetDesktopSecret(bool bCreateIfNeeded)
|
||||||
{
|
{
|
||||||
if (common.CSSSUtils.StoreDesktopPasswordInCache())
|
if (common.CSSSUtils.StoreDesktopPasswordInCache())
|
||||||
{
|
{
|
||||||
@ -914,12 +914,19 @@ namespace sscs.cache
|
|||||||
return secret;
|
return secret;
|
||||||
}
|
}
|
||||||
catch (SecretNotFoundException e)
|
catch (SecretNotFoundException e)
|
||||||
|
{
|
||||||
|
if (bCreateIfNeeded)
|
||||||
{
|
{
|
||||||
CSSSLogger.DbgLog("Desktop password not found in cache, creating one");
|
CSSSLogger.DbgLog("Desktop password not found in cache, creating one");
|
||||||
secret = new Secret(ConstStrings.MICASA_DESKTOP_PASSWD);
|
secret = new Secret(ConstStrings.MICASA_DESKTOP_PASSWD);
|
||||||
keyChain.AddSecret(secret);
|
keyChain.AddSecret(secret);
|
||||||
return secret;
|
return secret;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
catch (Exception e1)
|
catch (Exception e1)
|
||||||
{
|
{
|
||||||
CSSSLogger.DbgLog(e1.ToString());
|
CSSSLogger.DbgLog(e1.ToString());
|
||||||
@ -942,7 +949,7 @@ namespace sscs.cache
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Secret secret = GetDesktopSecret();
|
Secret secret = GetDesktopSecret(false);
|
||||||
if (secret != null)
|
if (secret != null)
|
||||||
{
|
{
|
||||||
string passwd = secret.GetKeyValue(ConstStrings.MICASA_DESKTOP_PASSWD_KEYNAME).GetValue();
|
string passwd = secret.GetKeyValue(ConstStrings.MICASA_DESKTOP_PASSWD_KEYNAME).GetValue();
|
||||||
|
@ -208,7 +208,7 @@ namespace sscs.verbs
|
|||||||
|
|
||||||
if (ConstStrings.MICASA_DESKTOP_PASSWD == secretId)
|
if (ConstStrings.MICASA_DESKTOP_PASSWD == secretId)
|
||||||
{
|
{
|
||||||
secret = ssStore.GetDesktopSecret();
|
secret = ssStore.GetDesktopSecret(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user