Code for Change Master Password
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user