Fix for Zen/Security issue, MasterPassword on Windows is optional by a setting in the Registry.

This commit is contained in:
Jim Norman 2008-03-31 19:16:02 +00:00
parent 8b3f9ade47
commit b83f659d48
8 changed files with 235 additions and 96 deletions

View File

@ -114,29 +114,30 @@ namespace Novell.CASA.GUI
[Glade.Widget] [Glade.Widget]
Gtk.Button okbuttonPersistentStorage, Gtk.Button okbuttonPersistentStorage,
buttonChooseDirectory; buttonChooseDirectory;
[Glade.Widget] [Glade.Widget]
Gtk.MenuItem mmiNew, Gtk.MenuItem mmiNew,
mmiNewKey, mmiNewKey,
mmiImportSecrets, mmiImportSecrets,
mmiExportSecrets, mmiExportSecrets,
mmiView, mmiView,
mmiLink, mmiLink,
mmiCopy, mmiCopy,
mmiDelete, mmiDelete,
mmiRefresh, mmiRefresh,
mmiLockSecrets, mmiLockSecrets,
mmiUnlockSecrets, mmiUnlockSecrets,
mmiDestroySecrets, mmiDestroySecrets,
mmiEdit, mmiEdit,
mmiOptions, mmiOptions,
mmiDebug, mmiDebug,
mmiApplicationSSO, mmiApplicationSSO,
mmiKonquerer, mmiKonquerer,
mmiKopete, mmiKopete,
mmiNetworkManager, mmiNetworkManager,
mmiGaim; mmiGaim,
mmiChangeMP;
[Glade.Widget] [Glade.Widget]
Gtk.RadioButton radiobutton1, Gtk.RadioButton radiobutton1,
@ -365,7 +366,17 @@ namespace Novell.CASA.GUI
else else
(notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING)).Visible = Common.IS_GNOMEKEYRING; (notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING)).Visible = Common.IS_GNOMEKEYRING;
notebookStores.CurrentPage = Common.STORE_MICASA; notebookStores.CurrentPage = Common.STORE_MICASA;
if (CommonGUI.UseMasterPassword())
{
mmiChangeMP.Visible = true;
}
else
{
mmiChangeMP.Visible = false;
}
if (MiCASAStore.IsLocked()) if (MiCASAStore.IsLocked())
LockGUI(); LockGUI();
@ -439,7 +450,7 @@ namespace Novell.CASA.GUI
// did the daemon get restarted before the user created a master password? // did the daemon get restarted before the user created a master password?
// if so, let's ask the user for their desktop password and set it if there's a cache file // if so, let's ask the user for their desktop password and set it if there's a cache file
if (true == DoPersistentFilesExist()) if ((false == miCASA.IsSecretPersistent(1,"")) && (true == DoPersistentFilesExist()))
{ {
Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogDesktopPassword", null); Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogDesktopPassword", null);
gxmlTemp.Autoconnect(this); gxmlTemp.Autoconnect(this);
@ -479,7 +490,7 @@ namespace Novell.CASA.GUI
if (entryDesktopPassword1.Text.Equals(entryDesktopPassword2.Text)) if (entryDesktopPassword1.Text.Equals(entryDesktopPassword2.Text))
{ {
if (miCASA.ValidateDesktopPwd(entryDesktopPassword1.Text)) if (miCASA.ValidateDesktopPwd(entryDesktopPassword1.Text + '\0'))
{ {
// set the desktop password in micasa // set the desktop password in micasa
try try
@ -498,9 +509,16 @@ namespace Novell.CASA.GUI
} }
if (dialogDesktopPassword != null) if (dialogDesktopPassword != null)
dialogDesktopPassword.Destroy(); dialogDesktopPassword.Destroy();
MasterPasswordAuthentication(); if (CommonGUI.UseMasterPassword())
{
MasterPasswordAuthentication();
}
else
{
InitializeGUI();
}
} }
else else
{ {
@ -2213,10 +2231,8 @@ namespace Novell.CASA.GUI
public void on_exportSecrets_activate(object obj, EventArgs args) public void on_exportSecrets_activate(object obj, EventArgs args)
{ {
ExportSecrets es = new ExportSecrets(config); ExportSecrets es = new ExportSecrets(config);
es.Run(); es.Run();
} }
public void on_importSecrets_activate(object obj, EventArgs args) public void on_importSecrets_activate(object obj, EventArgs args)

View File

@ -43,10 +43,13 @@ namespace Novell.CASA.GUI
public static string HINT_DIR = "Export Directory"; public static string HINT_DIR = "Export Directory";
public static string HINT_FILENAME = "Export Filename"; public static string HINT_FILENAME = "Export Filename";
public static string REMEMBER_SETTING = "Remember_Master_Password_Time"; public static string REMEMBER_SETTING = "Remember_Master_Password_Time";
private static string CASA_REG_KEY = "SOFTWARE\\Novell\\CASA";
[Glade.Widget] [Glade.Widget]
Gtk.Label label86, Gtk.Label label85,
label86,
label87,
label88; label88;
[Glade.Widget] [Glade.Widget]
@ -86,8 +89,21 @@ namespace Novell.CASA.GUI
gxmlTemp.Autoconnect (this); gxmlTemp.Autoconnect (this);
dialogLogin.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");; dialogLogin.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
label86.Text = "Enter your Master Password to unlock your secrets."; if (CommonGUI.UseMasterPassword())
{
dialogLogin.Title = "CASA - Master Password";
label85.Markup = "<b>Master Password Authentication</b>";
label86.Text = "Enter your Master Password to unlock your secrets.";
label87.Text = "Master Password:";
}
else
{
dialogLogin.Title = "CASA - Desktop Password";
label85.Markup = "<b>Password Authentication</b>";
label86.Text = "Enter your Desktop Password to unlock your secrets.";
label87.Text = "Desktop Password:";
}
entryMasterPassword3.Text=""; entryMasterPassword3.Text="";
label88.Hide(); label88.Hide();
@ -393,11 +409,36 @@ namespace Novell.CASA.GUI
internal static bool UseMasterPassword() internal static bool UseMasterPassword()
{ {
#if W32
return IsRegKeySet(CASA_REG_KEY, "UseMasterPassword");
#else
return true; return true;
#endif
} }
#if W32 #if W32
private static bool IsRegKeySet(string sPath, string sValue)
{
Microsoft.Win32.RegistryKey key;
try
{
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(sPath);
int iValue = (int)key.GetValue(sValue);
key.Close();
if (iValue > 0)
{
return true;
}
}
catch (Exception e)
{
}
return false;
}
public static bool IsGTKSharpInstalled() public static bool IsGTKSharpInstalled()
{ {

View File

@ -18,7 +18,10 @@ namespace Novell.CASA.GUI
private Config m_config = null; private Config m_config = null;
[Glade.Widget] [Glade.Widget]
Gtk.Label label86, Gtk.Label labelExportDialogDesc1,
labelExportDialogDesc2,
labelExportDialogPrompt,
label86,
label88; label88;
[Glade.Widget] [Glade.Widget]
@ -49,13 +52,22 @@ namespace Novell.CASA.GUI
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogExport", null); Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogExport", null);
#endif #endif
gxmlTemp.Autoconnect (this); gxmlTemp.Autoconnect (this);
dialogExport.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");;
if (CommonGUI.UseMasterPassword())
{
labelExportDialogDesc1.Visible = true;
}
else
{
labelExportDialogDesc2.Visible = true;
labelExportDialogPrompt.Text = "Encryption string:";
}
dialogExport.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
dialogExport.Destroyed += new EventHandler(dialogExport_Destroyed); dialogExport.Destroyed += new EventHandler(dialogExport_Destroyed);
dialogExport.Modal = true; dialogExport.Modal = true;
dialogExport.Show(); dialogExport.Show();
} }
private void dialogExport_Destroyed(object sender, EventArgs e) private void dialogExport_Destroyed(object sender, EventArgs e)
{ {
@ -77,14 +89,22 @@ namespace Novell.CASA.GUI
} }
private void on_buttonOkExportSecrets_clicked(object sender, EventArgs args) private void on_buttonOkExportSecrets_clicked(object sender, EventArgs args)
{ {
if( 0 == miCASA.SetMasterPassword(0, entryMasterPassword.Text) ) bool bUseMasterPassword = CommonGUI.UseMasterPassword();
if ( ((bUseMasterPassword) && (0 == miCASA.SetMasterPassword(0, entryMasterPassword.Text) ))
|| (!bUseMasterPassword))
{ {
string sMasterPWD = entryMasterPassword.Text; string sMasterPWD = entryMasterPassword.Text;
string sEncryptString = entryMasterPassword.Text; string sEncryptString = entryMasterPassword.Text;
if (checkbuttonNoEncrypt.Active) if (checkbuttonNoEncrypt.Active)
sEncryptString = null; sEncryptString = null;
if (entryMasterPassword.Text.Length < 1)
{
sEncryptString = null;
}
if (dialogExport != null) if (dialogExport != null)
{ {

View File

@ -56,7 +56,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4481"> <widget class="GtkImage" id="image4507">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-new</property> <property name="stock">gtk-new</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -78,7 +78,7 @@
<signal name="activate" handler="OnNewSecretActivated" last_modification_time="Tue, 27 Sep 2005 06:02:26 GMT"/> <signal name="activate" handler="OnNewSecretActivated" last_modification_time="Tue, 27 Sep 2005 06:02:26 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4482"> <widget class="GtkImage" id="image4508">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-new</property> <property name="stock">gtk-new</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -99,7 +99,7 @@
<signal name="activate" handler="OnNewKeyActivated" last_modification_time="Tue, 27 Sep 2005 06:02:36 GMT"/> <signal name="activate" handler="OnNewKeyActivated" last_modification_time="Tue, 27 Sep 2005 06:02:36 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4483"> <widget class="GtkImage" id="image4509">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-new</property> <property name="stock">gtk-new</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -125,7 +125,7 @@
<accelerator key="F5" modifiers="0" signal="activate"/> <accelerator key="F5" modifiers="0" signal="activate"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4484"> <widget class="GtkImage" id="image4510">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-refresh</property> <property name="stock">gtk-refresh</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -152,7 +152,7 @@
<signal name="activate" handler="OnLockMiCASASecrets" last_modification_time="Mon, 10 Oct 2005 19:51:54 GMT"/> <signal name="activate" handler="OnLockMiCASASecrets" last_modification_time="Mon, 10 Oct 2005 19:51:54 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4485"> <widget class="GtkImage" id="image4511">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-dialog-authentication</property> <property name="stock">gtk-dialog-authentication</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -173,7 +173,7 @@
<signal name="activate" handler="OnUnLockMiCASASecrets" last_modification_time="Tue, 11 Oct 2005 20:12:35 GMT"/> <signal name="activate" handler="OnUnLockMiCASASecrets" last_modification_time="Tue, 11 Oct 2005 20:12:35 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4486"> <widget class="GtkImage" id="image4512">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-open</property> <property name="stock">gtk-open</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -194,7 +194,7 @@
<signal name="activate" handler="OnDestroyMiCASASecrets" last_modification_time="Tue, 11 Oct 2005 20:12:35 GMT"/> <signal name="activate" handler="OnDestroyMiCASASecrets" last_modification_time="Tue, 11 Oct 2005 20:12:35 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4487"> <widget class="GtkImage" id="image4513">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-delete</property> <property name="stock">gtk-delete</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -221,7 +221,7 @@
<signal name="activate" handler="on_exportSecrets_activate" last_modification_time="Mon, 07 Aug 2006 19:38:42 GMT"/> <signal name="activate" handler="on_exportSecrets_activate" last_modification_time="Mon, 07 Aug 2006 19:38:42 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4488"> <widget class="GtkImage" id="image4514">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-floppy</property> <property name="stock">gtk-floppy</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -242,7 +242,7 @@
<signal name="activate" handler="on_importSecrets_activate" last_modification_time="Mon, 07 Aug 2006 19:38:42 GMT"/> <signal name="activate" handler="on_importSecrets_activate" last_modification_time="Mon, 07 Aug 2006 19:38:42 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4489"> <widget class="GtkImage" id="image4515">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-open</property> <property name="stock">gtk-open</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -270,7 +270,7 @@
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/> <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4490"> <widget class="GtkImage" id="image4516">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-quit</property> <property name="stock">gtk-quit</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -306,7 +306,7 @@
<accelerator key="F2" modifiers="0" signal="activate"/> <accelerator key="F2" modifiers="0" signal="activate"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4491"> <widget class="GtkImage" id="image4517">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-zoom-fit</property> <property name="stock">gtk-zoom-fit</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -327,7 +327,7 @@
<signal name="activate" handler="LinkKeyValue" last_modification_time="Fri, 19 Aug 2005 06:23:15 GMT"/> <signal name="activate" handler="LinkKeyValue" last_modification_time="Fri, 19 Aug 2005 06:23:15 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4492"> <widget class="GtkImage" id="image4518">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-jump-to</property> <property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -348,7 +348,7 @@
<signal name="activate" handler="CopyKeyValue" last_modification_time="Fri, 19 Aug 2005 06:23:15 GMT"/> <signal name="activate" handler="CopyKeyValue" last_modification_time="Fri, 19 Aug 2005 06:23:15 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4493"> <widget class="GtkImage" id="image4519">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-copy</property> <property name="stock">gtk-copy</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -376,7 +376,7 @@
<accelerator key="f" modifiers="GDK_CONTROL_MASK" signal="activate"/> <accelerator key="f" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4494"> <widget class="GtkImage" id="image4520">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-find-and-replace</property> <property name="stock">gtk-find-and-replace</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -404,7 +404,7 @@
<accelerator key="Delete" modifiers="0" signal="activate"/> <accelerator key="Delete" modifiers="0" signal="activate"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4495"> <widget class="GtkImage" id="image4521">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-delete</property> <property name="stock">gtk-delete</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -438,7 +438,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4496"> <widget class="GtkImage" id="image4522">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-execute</property> <property name="stock">gtk-execute</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -460,7 +460,7 @@
<signal name="activate" handler="on_konquerer_activate" last_modification_time="Thu, 02 Mar 2006 07:08:06 GMT"/> <signal name="activate" handler="on_konquerer_activate" last_modification_time="Thu, 02 Mar 2006 07:08:06 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4497"> <widget class="GtkImage" id="image4523">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-execute</property> <property name="stock">gtk-execute</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -481,7 +481,7 @@
<signal name="activate" handler="on_kopete_activate" last_modification_time="Thu, 02 Mar 2006 07:08:44 GMT"/> <signal name="activate" handler="on_kopete_activate" last_modification_time="Thu, 02 Mar 2006 07:08:44 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4498"> <widget class="GtkImage" id="image4524">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-execute</property> <property name="stock">gtk-execute</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -502,7 +502,7 @@
<signal name="activate" handler="on_networkmanager_activate" last_modification_time="Thu, 02 Mar 2006 07:07:54 GMT"/> <signal name="activate" handler="on_networkmanager_activate" last_modification_time="Thu, 02 Mar 2006 07:07:54 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4499"> <widget class="GtkImage" id="image4525">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-execute</property> <property name="stock">gtk-execute</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -523,7 +523,7 @@
<signal name="activate" handler="on_gaim_activate" last_modification_time="Thu, 02 Mar 2006 07:07:29 GMT"/> <signal name="activate" handler="on_gaim_activate" last_modification_time="Thu, 02 Mar 2006 07:07:29 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4500"> <widget class="GtkImage" id="image4526">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-execute</property> <property name="stock">gtk-execute</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -541,14 +541,14 @@
</child> </child>
<child> <child>
<widget class="GtkImageMenuItem" id="reset_master_password1"> <widget class="GtkImageMenuItem" id="mmiChangeMP">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">_Change Master Password</property> <property name="label" translatable="yes">_Change Master Password</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<signal name="activate" handler="ResetMasterPassword" last_modification_time="Wed, 02 Nov 2005 15:28:00 GMT"/> <signal name="activate" handler="ResetMasterPassword" last_modification_time="Wed, 02 Nov 2005 15:28:00 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4501"> <widget class="GtkImage" id="image4527">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property> <property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -575,7 +575,7 @@
<signal name="activate" handler="Preferences" last_modification_time="Fri, 19 Aug 2005 06:40:17 GMT"/> <signal name="activate" handler="Preferences" last_modification_time="Fri, 19 Aug 2005 06:40:17 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4502"> <widget class="GtkImage" id="image4528">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-preferences</property> <property name="stock">gtk-preferences</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -603,7 +603,7 @@
<accelerator key="F3" modifiers="0" signal="activate"/> <accelerator key="F3" modifiers="0" signal="activate"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4503"> <widget class="GtkImage" id="image4529">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-properties</property> <property name="stock">gtk-properties</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -637,7 +637,7 @@
<signal name="activate" handler="on_create_sample_secrets1_activate" last_modification_time="Fri, 30 Sep 2005 12:58:41 GMT"/> <signal name="activate" handler="on_create_sample_secrets1_activate" last_modification_time="Fri, 30 Sep 2005 12:58:41 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4504"> <widget class="GtkImage" id="image4530">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-add</property> <property name="stock">gtk-add</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -658,7 +658,7 @@
<signal name="activate" handler="on_remove_test_secrets1_activate" last_modification_time="Fri, 30 Sep 2005 12:59:05 GMT"/> <signal name="activate" handler="on_remove_test_secrets1_activate" last_modification_time="Fri, 30 Sep 2005 12:59:05 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4505"> <widget class="GtkImage" id="image4531">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-remove</property> <property name="stock">gtk-remove</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -724,7 +724,7 @@
<accelerator key="F1" modifiers="0" signal="activate"/> <accelerator key="F1" modifiers="0" signal="activate"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4506"> <widget class="GtkImage" id="image4532">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-help</property> <property name="stock">gtk-help</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -751,7 +751,7 @@
<signal name="activate" handler="About" last_modification_time="Thu, 01 Sep 2005 15:30:28 GMT"/> <signal name="activate" handler="About" last_modification_time="Thu, 01 Sep 2005 15:30:28 GMT"/>
<child internal-child="image"> <child internal-child="image">
<widget class="GtkImage" id="image4507"> <widget class="GtkImage" id="image4533">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stock">gtk-dialog-info</property> <property name="stock">gtk-dialog-info</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
@ -12364,27 +12364,68 @@ the following characters
</child> </child>
<child> <child>
<widget class="GtkLabel" id="label264"> <widget class="GtkVBox" id="vbox197">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Your Master Password is required to <property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkLabel" id="labelExportDialogDesc1">
<property name="label" translatable="yes">Your Master Password is required to
export your secrets. Your secrets will export your secrets. Your secrets will
be encrypted using your Master Password. be encrypted using your Master Password.
If you wish, you can export your secrets If you wish, you can export your secrets
in clear text. </property> in clear text. </property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property> <property name="wrap">False</property>
<property name="selectable">False</property> <property name="selectable">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property> <property name="width_chars">-1</property>
<property name="single_line_mode">False</property> <property name="single_line_mode">False</property>
<property name="angle">0</property> <property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="labelExportDialogDesc2">
<property name="label" translatable="yes">Enter a string to encrypt your secrets. The
same string will be required when you import
them.
If you wish, you can export your secrets
in clear text. </property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget> </widget>
<packing> <packing>
<property name="padding">4</property> <property name="padding">4</property>
@ -12438,7 +12479,7 @@ in clear text. </property>
<property name="column_spacing">6</property> <property name="column_spacing">6</property>
<child> <child>
<widget class="GtkLabel" id="label265"> <widget class="GtkLabel" id="labelExportDialogPrompt">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Master Password :</property> <property name="label" translatable="yes">Master Password :</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
@ -12685,7 +12726,7 @@ in clear text. </property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">The file you selected appears <property name="label" translatable="yes">The file you selected appears
to be encypted. Please enter to be encypted. Please enter
the Master Password used the Encryption String used
to encrypt this file</property> to encrypt this file</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
@ -12755,7 +12796,7 @@ to encrypt this file</property>
<child> <child>
<widget class="GtkLabel" id="label268"> <widget class="GtkLabel" id="label268">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Master Password :</property> <property name="label" translatable="yes">Encryption String :</property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>

View File

@ -157,14 +157,25 @@ namespace sscs.cache
if (sDesktopPassword != null) if (sDesktopPassword != null)
{ {
// verify Desktop password // verify Desktop password
//state = STATE_OK; if (IsDesktopPassword(sDesktopPassword))
//return true; {
state = STATE_OK;
return true;
}
} }
if (sMasterPassword != null) if (sMasterPassword != null)
{ {
// verify MasterPassword if (common.CSSSUtils.UseMasterPassword())
if (SetMasterPassword(sMasterPassword)) {
// verify MasterPassword
if (SetMasterPassword(sMasterPassword))
{
state = STATE_OK;
return true;
}
}
else if (IsDesktopPassword(sMasterPassword))
{ {
state = STATE_OK; state = STATE_OK;
return true; return true;

View File

@ -91,6 +91,16 @@ namespace sscs.common
return true; return true;
#else #else
return IsRegKeySet(CASA_REG_KEY, "CacheDesktopPassword"); return IsRegKeySet(CASA_REG_KEY, "CacheDesktopPassword");
#endif
}
public static bool UseMasterPassword()
{
#if LINUX
return true;
#else
//return false;
return IsRegKeySet(CASA_REG_KEY, "UseMasterPassword");
#endif #endif
} }