return locked on EnumerateSecretIds when the store is locked.

This commit is contained in:
Jim Norman 2006-10-17 22:06:37 +00:00
parent 39fdc355c7
commit ce68c1352a

View File

@ -89,6 +89,8 @@ namespace sscs.verbs
try try
{ {
SecretStore ssStore = SessionManager.GetUserSecretStore(userId); SecretStore ssStore = SessionManager.GetUserSecretStore(userId);
if (!ssStore.IsStoreLocked())
{
if( ssStore.CheckIfKeyChainExists(keyChainId) ) if( ssStore.CheckIfKeyChainExists(keyChainId) )
{ {
KeyChain keyChain = ssStore.GetKeyChain(keyChainId); KeyChain keyChain = ssStore.GetKeyChain(keyChainId);
@ -112,6 +114,11 @@ namespace sscs.verbs
retCode = IPCRetCodes.SSCS_E_KEYCHAIN_DOES_NOT_EXIST; retCode = IPCRetCodes.SSCS_E_KEYCHAIN_DOES_NOT_EXIST;
} }
} }
else
{
retCode = IPCRetCodes.SSCS_SECRET_STORE_IS_LOCKED;
}
}
catch(UserNotInSessionException) catch(UserNotInSessionException)
{ {
CSSSLogger.DbgLog("In " + CSSSLogger.GetExecutionPath(this) + " Unable to get user's secretstore" ); CSSSLogger.DbgLog("In " + CSSSLogger.GetExecutionPath(this) + " Unable to get user's secretstore" );