From 6fe32f742cead3846177ec643873664c5f39fc8c Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Wed, 6 Dec 2006 11:06:41 +0000 Subject: [PATCH] Create Session KeyChain, and Server KeyChain by default during creation of user session. --- CASA/micasad/common/SessionManager.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/CASA/micasad/common/SessionManager.cs b/CASA/micasad/common/SessionManager.cs index 20c2fc84..b25129d1 100644 --- a/CASA/micasad/common/SessionManager.cs +++ b/CASA/micasad/common/SessionManager.cs @@ -105,8 +105,21 @@ namespace sscs.common mutex.ReleaseMutex(); ss = user.GetSecretStore(); ss.IncrRefCount(); - ss.CreateTime = DateTime.Now; - ss.StartPersistenceOfServerSecretsBySystemKey(); + ss.CreateTime = DateTime.Now; + + // add session keychain if it does not exist. + if (!ss.CheckIfKeyChainExists(constants.ConstStrings.SSCS_SESSION_KEY_CHAIN_ID + '\0')) + { + ss.AddKeyChain(new KeyChain(constants.ConstStrings.SSCS_SESSION_KEY_CHAIN_ID + '\0')); + } + + // add server keychain if it does not exist. + if (!ss.CheckIfKeyChainExists(constants.ConstStrings.SSCS_SERVER_KEY_CHAIN_ID + '\0')) + { + ss.AddKeyChain(new KeyChain(constants.ConstStrings.SSCS_SERVER_KEY_CHAIN_ID + '\0')); + } + + ss.StartPersistenceOfServerSecretsBySystemKey(); return ss; } }