Code for Change Master Password

This commit is contained in:
Jim Norman
2005-11-03 20:24:36 +00:00
parent fb5296c0c3
commit 04e1ae02b0
3 changed files with 61 additions and 41 deletions

View File

@@ -487,6 +487,12 @@ namespace Novell.CASA
}
}
internal void closeSecretStore(IntPtr hSC)
{
SSCS_EXT_T ext = new SSCS_EXT_T();
miCASACloseSecretStoreCache(hSC, 0, ext);
}
internal Secret getSecret(
IntPtr pHsc,
string sKeyChainID,
@@ -1228,9 +1234,9 @@ namespace Novell.CASA
null,
new SSCS_EXT_T());
}
catch(Exception)
catch(Exception e)
{
//Console.WriteLine(e.ToString());
Console.WriteLine(e.ToString());
}
return rcode;
}
@@ -1241,19 +1247,26 @@ namespace Novell.CASA
if (null != id && "" !=id)
{
SSCS_SECRET_ID_T secretID = new SSCS_SECRET_ID_T();
if(ssFlags == 0)
try
{
secretID.len = id.Length;
secretID.id = id;
rcode = miCASAIsSecretPersistent(ssFlags,
secretID,
new SSCS_EXT_T());
if(ssFlags == 0)
{
secretID.len = id.Length;
secretID.id = id;
rcode = miCASAIsSecretPersistent(ssFlags,
secretID,
new SSCS_EXT_T());
}
else
{
rcode = miCASAIsSecretPersistent(ssFlags,
null,
new SSCS_EXT_T());
}
}
else
catch (Exception e)
{
rcode = miCASAIsSecretPersistent(ssFlags,
null,
new SSCS_EXT_T());
Console.WriteLine(e.ToString());
}
}
@@ -1419,6 +1432,19 @@ namespace Novell.CASA
}
return sb.ToString();
}
internal static bool ResetMasterPassword(string sCurrentPassword, string sNewPassword)
{
ResetMasterPassword rmp = new ResetMasterPassword(sCurrentPassword, sNewPassword);
ResetMasterPassword o = (ResetMasterPassword)MiCasa.Communication.MiCasaRequestReply.Send(
MiCasaRequestReply.VERB_RESET_MASTER_PASSWORD,
rmp);
if (o.rcode != 0)
return false;
else
return true;
}
}
}