commit dc543a4e929c4c2c75f91cdc14c322716a74ff55
parent 2fbce58effd0272187cadc4d0601b9ddaa529403
Author: Oliver Lowe <o@olowe.co>
Date: Tue, 5 Aug 2025 09:01:48 +0700
Remove "old, DES-CBC-broken implementation" password store
Diffstat:
12 files changed, 40 insertions(+), 161 deletions(-)
diff --git a/autogen.sh b/autogen.sh
@@ -57,4 +57,4 @@ ${LIBTOOL} \
&& automake --add-missing --foreign --copy
if test -z "$NOCONFIGURE"; then
exec ./configure --enable-maintainer-mode "$@"
-fi
+fi
diff --git a/configure.ac b/configure.ac
@@ -517,37 +517,9 @@ if test x"$ac_cv_with_config_dir" = x""; then
fi
AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
-AC_ARG_WITH(password-encryption, [ --with-password-encryption=PROVIDER Which cryptographic library to use for encrypting stored passwords (gnutls, old, default)],
- pwd_crypto="$withval", pwd_crypto="default")
-
-if test x"$pwd_crypto" = xdefault; then
- if test x"$enable_gnutls" = xyes; then
- if `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
- pwd_crypto="gnutls"
- fi
- fi
+if ! `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
+ AC_MSG_ERROR([GnuTLS version at least 3.0 is required for password encryption.])
fi
-if test x"$pwd_crypto" = xdefault; then
- pwd_crypto="old"
-fi
-
-case $pwd_crypto in
- gnutls)
- if test x"$enable_gnutls" = xno; then
- AC_MSG_ERROR([GnuTLS password encryption requested but GnuTLS is not available.])
- fi
- if ! `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
- AC_MSG_ERROR([GnuTLS version at least 3.0 is required for password encryption.])
- fi
- AC_DEFINE(PASSWORD_CRYPTO_GNUTLS, 1, Use GnuTLS for stored password encryption)
- ;;
- old)
- AC_DEFINE(PASSWORD_CRYPTO_OLD, 1, Use old insecure method for stored password encryption)
- ;;
- *)
- AC_MSG_ERROR([Unknown password encryption provider requested.])
- ;;
-esac
AC_MSG_CHECKING([whether GnuTLS support is present for OAuth2])
if test x"$enable_gnutls" = xyes; then
diff --git a/src/autofaces.c b/src/autofaces.c
@@ -2,12 +2,12 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
* Copyright (C) 2008-2012 Ricardo Mones and the Claws Mail team
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
*/
#ifdef HAVE_CONFIG_H
@@ -61,9 +61,9 @@ static gchar * get_any_face_filename_for_account(gchar *facetype, gchar *account
{
gchar *name = NULL;
gchar *what = NULL;
- if (facetype == NULL || accountname == NULL)
+ if (facetype == NULL || accountname == NULL)
return NULL;
- if (*facetype == '\0' || *accountname == '\0')
+ if (*facetype == '\0' || *accountname == '\0')
return NULL;
what = name = g_strdup_printf("%s.%s", facetype, accountname);
while (*what) {
@@ -117,4 +117,3 @@ gint get_account_face(gchar *buf, gint len, gchar *name) {
g_warning("header face filename invalid");
return -1;
}
-
diff --git a/src/mainwindow.c b/src/mainwindow.c
@@ -426,10 +426,8 @@ static void sync_cb ( GtkAction *action,
static void forget_session_passwords_cb (GtkAction *action,
gpointer data );
-#ifndef PASSWORD_CRYPTO_OLD
static void forget_primary_passphrase_cb (GtkAction *action,
gpointer data );
-#endif
static gboolean mainwindow_focus_in_event (GtkWidget *widget,
GdkEventFocus *focus,
gpointer data);
@@ -780,9 +778,7 @@ static GtkActionEntry mainwin_entries[] =
#endif
/* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
{"Tools/ForgetSessionPasswords", NULL, N_("_Forget all session passwords"), NULL, NULL, G_CALLBACK(forget_session_passwords_cb) },
-#ifndef PASSWORD_CRYPTO_OLD
{"Tools/ForgetPrimaryPassphrase", NULL, N_("Forget _primary passphrase"), NULL, NULL, G_CALLBACK(forget_primary_passphrase_cb) },
-#endif
/* Configuration menu */
{"Configuration/ChangeAccount", NULL, N_("C_hange current account"), NULL, NULL, NULL },
@@ -1839,9 +1835,7 @@ MainWindow *main_window_create()
#endif
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator8", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "ForgetSessionPasswords", "Tools/ForgetSessionPasswords", GTK_UI_MANAGER_MENUITEM)
-#ifndef PASSWORD_CRYPTO_OLD
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "ForgetPrimaryPassphrase", "Tools/ForgetPrimaryPassphrase", GTK_UI_MANAGER_MENUITEM)
-#endif
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator9", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
/* Configuration menu */
@@ -3062,11 +3056,9 @@ SensitiveCondMask main_window_get_current_state(MainWindow *mainwin)
}
}
-#ifndef PASSWORD_CRYPTO_OLD
if (primary_passphrase_is_entered()) {
UPDATE_STATE(M_MASTER_PASSPHRASE);
}
-#endif
#undef UPDATE_STATE
@@ -3199,9 +3191,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
SET_SENSITIVE("Menu/Tools/Execute", M_DELAY_EXEC);
SET_SENSITIVE("Menu/Tools/Expunge", M_DELETED_EXISTS);
SET_SENSITIVE("Menu/Tools/ForgetSessionPasswords", M_SESSION_PASSWORDS);
-#ifndef PASSWORD_CRYPTO_OLD
SET_SENSITIVE("Menu/Tools/ForgetPrimaryPassphrase", M_MASTER_PASSPHRASE);
-#endif
SET_SENSITIVE("Menu/Tools/DeleteDuplicates/SelFolder", M_MSG_EXIST, M_ALLOW_DELETE);
SET_SENSITIVE("Menu/Configuration", M_UNLOCKED);
@@ -5379,7 +5369,6 @@ static void forget_session_passwords_cb(GtkAction *action, gpointer data)
fgtn), fgtn, accs);
}
-#ifndef PASSWORD_CRYPTO_OLD
static void forget_primary_passphrase_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
@@ -5388,7 +5377,6 @@ static void forget_primary_passphrase_cb(GtkAction *action, gpointer data)
primary_passphrase_forget();
main_window_unlock(mainwin);
}
-#endif
void mainwindow_learn (MainWindow *mainwin, gboolean is_spam)
{
diff --git a/src/password.c b/src/password.c
@@ -21,10 +21,8 @@
#include "claws-features.h"
#endif
-#ifdef PASSWORD_CRYPTO_GNUTLS
# include <gnutls/gnutls.h>
# include <gnutls/crypto.h>
-#endif
#include <glib.h>
#include <glib/gi18n.h>
@@ -48,7 +46,6 @@
#include "passwordstore.h"
#include "prefs_common.h"
-#ifndef PASSWORD_CRYPTO_OLD
static gchar *_primary_passphrase = NULL;
/* Length of stored key derivation, before base64. */
@@ -263,28 +260,6 @@ void primary_passphrase_change(const gchar *oldp, const gchar *newp)
primary_passphrase_forget();
}
-#endif
-
-#ifdef PASSWORD_CRYPTO_OLD
-gchar *password_encrypt_old(const gchar *password)
-{
- if (!password || strlen(password) == 0) {
- return NULL;
- }
-
- gchar *encrypted = g_strdup(password);
- gchar *encoded, *result;
- gsize len = strlen(password);
-
- passcrypt_encrypt(encrypted, len);
- encoded = g_base64_encode(encrypted, len);
- g_free(encrypted);
- result = g_strconcat("!", encoded, NULL);
- g_free(encoded);
-
- return result;
-}
-#endif
/* Decryption is still needed for supporting migration of old
* configurations to newer encryption mechanisms. */
@@ -305,7 +280,6 @@ gchar *password_decrypt_old(const gchar *password)
return decrypted;
}
-#ifdef PASSWORD_CRYPTO_GNUTLS
#define BUFSIZE 128
/* Since we can't count on having GnuTLS new enough to have
@@ -554,8 +528,6 @@ gchar *password_decrypt_gnutls(const gchar *password,
#undef BUFSIZE
-#endif
-
gchar *password_encrypt(const gchar *password,
const gchar *encryption_passphrase)
{
@@ -563,14 +535,10 @@ gchar *password_encrypt(const gchar *password,
return NULL;
}
-#ifndef PASSWORD_CRYPTO_OLD
if (encryption_passphrase == NULL)
encryption_passphrase = primary_passphrase();
return password_encrypt_real(password, encryption_passphrase);
-#else
- return password_encrypt_old(password);
-#endif
}
gchar *password_decrypt(const gchar *password,
@@ -588,7 +556,6 @@ gchar *password_decrypt(const gchar *password,
}
/* Try available crypto backend */
-#ifndef PASSWORD_CRYPTO_OLD
if (decryption_passphrase == NULL)
decryption_passphrase = primary_passphrase();
@@ -596,7 +563,6 @@ gchar *password_decrypt(const gchar *password,
debug_print("Trying to decrypt password...\n");
return password_decrypt_real(password, decryption_passphrase);
}
-#endif
/* Fallback, in case the configuration is really old and
* stored password in plaintext */
diff --git a/src/password.h b/src/password.h
@@ -21,7 +21,6 @@
#include <glib.h>
-#ifndef PASSWORD_CRYPTO_OLD
/* Returns a pointer to primary passphrase, asking the user
* if necessary. Do not free the return value. */
const gchar *primary_passphrase();
@@ -43,28 +42,13 @@ void primary_passphrase_forget();
* primary_passphrase()
* newp - new primary passphrase */
void primary_passphrase_change(const gchar *oldp, const gchar *newp);
-#endif
-/* Wrapper around the old, DES-CBC-broken implementation which
- * returns a newly allocated string for the encrypt/decrypt result.
- * This is for compatibility with with the rest of password-related
- * functions.*/
-#ifdef PASSWORD_CRYPTO_OLD
-gchar *password_encrypt_old(const gchar *password);
-#endif
-/* Decryption is still needed for supporting migration of old
- * configurations to newer encryption mechanisms. */
-gchar *password_decrypt_old(const gchar *password);
-
-#ifdef PASSWORD_CRYPTO_GNUTLS
-/* GNUTLS implementation */
gchar *password_encrypt_gnutls(const gchar *password,
const gchar *encryption_passphrase);
gchar *password_decrypt_gnutls(const gchar *password,
const gchar *decryption_passphrase);
#define password_encrypt_real(n, m) password_encrypt_gnutls(n, m)
#define password_decrypt_real(n, m) password_decrypt_gnutls(n, m)
-#endif
/* Wrapper function that will apply best encryption available,
* and return a string ready to be saved as-is in preferences. */
diff --git a/src/password_gtk.c b/src/password_gtk.c
@@ -21,8 +21,6 @@
#include "claws-features.h"
#endif
-#ifndef PASSWORD_CRYPTO_OLD
-
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@@ -259,5 +257,3 @@ void primary_passphrase_change_dialog()
g_free(ctx);
}
-
-#endif /* !PASSWORD_CRYPTO_OLD */
diff --git a/src/password_gtk.h b/src/password_gtk.h
@@ -20,8 +20,6 @@
#ifndef __PASSWORD_GTK_H
#define __PASSWORD_GTK_H
-#ifndef PASSWORD_CRYPTO_OLD
void primary_passphrase_change_dialog();
-#endif
#endif /* __PASSWORD_GTK_H */
diff --git a/src/passwordstore.c b/src/passwordstore.c
@@ -22,10 +22,8 @@
#include "claws-features.h"
#endif
-#ifdef PASSWORD_CRYPTO_GNUTLS
# include <gnutls/gnutls.h>
# include <gnutls/crypto.h>
-#endif
#include <glib.h>
#include <glib/gi18n.h>
diff --git a/src/prefs_common.c b/src/prefs_common.c
@@ -1309,12 +1309,10 @@ static PrefParam param[] = {
{"address_search_wildcard", "TRUE", &prefs_common.address_search_wildcard, P_BOOL,
NULL, NULL, NULL},
{"enable_avatars", "3", &prefs_common.enable_avatars, P_INT, NULL, NULL, NULL},
-#ifndef PASSWORD_CRYPTO_OLD
{"use_master_passphrase", FALSE, &prefs_common.use_primary_passphrase, P_BOOL, NULL, NULL, NULL },
{"master_passphrase", "", &prefs_common.primary_passphrase, P_STRING, NULL, NULL, NULL },
{"master_passphrase_salt", "", &prefs_common.primary_passphrase_salt, P_STRING, NULL, NULL, NULL },
{"master_passphrase_pbkdf2_rounds", "50000", &prefs_common.primary_passphrase_pbkdf2_rounds, P_INT, NULL, NULL, NULL},
-#endif
{"use_proxy", "FALSE", &prefs_common.use_proxy, P_BOOL, NULL, NULL, NULL},
{"proxy_type", "1", &prefs_common.proxy_info.proxy_type, P_ENUM, NULL, NULL, NULL},
diff --git a/src/prefs_common.h b/src/prefs_common.h
@@ -217,7 +217,7 @@ struct _PrefsCommon
gboolean forward_as_attachment;
gboolean redirect_keep_from;
gchar *quote_chars;
-
+
gboolean enable_aspell;
gchar *dictionary;
gchar *alt_dictionary;
@@ -341,7 +341,7 @@ struct _PrefsCommon
gint msgwin_height;
gint mimeview_tree_height;
-
+
gint sourcewin_width;
gint sourcewin_height;
@@ -465,15 +465,15 @@ struct _PrefsCommon
gint io_timeout_secs;
gboolean gtk_enable_accels;
-
+
/* Memory cache*/
gint cache_max_mem_usage;
gint cache_min_keep_time;
-
- /* boolean for work offline
+
+ /* boolean for work offline
stored here for use in inc.c */
gboolean work_offline;
-
+
gint summary_quicksearch_type;
gint summary_quicksearch_sticky;
gint summary_quicksearch_recurse;
@@ -562,7 +562,7 @@ struct _PrefsCommon
gint print_margin_bottom;
gint print_margin_left;
gint print_margin_right;
-
+
gint print_use_color;
gint print_use_collate;
gint print_use_reverse;
@@ -570,7 +570,7 @@ struct _PrefsCommon
gint print_imgs;
gint print_previewwin_width;
gint print_previewwin_height;
-
+
gboolean use_networkmanager;
gboolean use_shred;
gboolean two_line_vert;
@@ -584,12 +584,10 @@ struct _PrefsCommon
guint enable_avatars;
-#ifndef PASSWORD_CRYPTO_OLD
gboolean use_primary_passphrase;
gchar *primary_passphrase;
gchar *primary_passphrase_salt;
guint primary_passphrase_pbkdf2_rounds;
-#endif
gboolean passphrase_dialog_msg_title_switch;
gboolean mh_compat_mode;
diff --git a/src/prefs_other.c b/src/prefs_other.c
@@ -37,10 +37,8 @@
#include "gtk/gtkutils.h"
#include "gtk/prefswindow.h"
#include "combobox.h"
-#ifndef PASSWORD_CRYPTO_OLD
#include "password.h"
#include "password_gtk.h"
-#endif
#include "manage_window.h"
#ifdef HAVE_LIBETPAN
@@ -71,14 +69,10 @@ typedef struct _OtherPage
GtkWidget *flush_metadata_faster_radiobtn;
GtkWidget *flush_metadata_safer_radiobtn;
GtkWidget *checkbtn_transhdr;
-#ifndef PASSWORD_CRYPTO_OLD
GtkWidget *checkbtn_use_passphrase;
-#endif
} OtherPage;
-#ifndef PASSWORD_CRYPTO_OLD
static void prefs_change_primary_passphrase(GtkButton *button, gpointer data);
-#endif
struct KeyBind {
const gchar *accel_path;
@@ -169,9 +163,9 @@ static void prefs_keybind_preset_changed(GtkComboBox *widget)
{"<Actions>/Menu/Message/Marks/MarkRead", ""},
{"<Actions>/Menu/Tools/AddressBook", "<shift><control>A"},
- {"<Actions>/Menu/Tools/ListUrls", "<shift><control>U"},
+ {"<Actions>/Menu/Tools/ListUrls", "<shift><control>U"},
{"<Actions>/Menu/Tools/Execute", "X"},
- {"<Actions>/Menu/Tools/Expunge", "<control>E"},
+ {"<Actions>/Menu/Tools/Expunge", "<control>E"},
{"<Actions>/Menu/Tools/NetworkLog", "<shift><control>L"},
/* compose */
@@ -338,18 +332,18 @@ static void prefs_keybind_preset_changed(GtkComboBox *widget)
prefs_keybind_apply(menurc, n_menurc);
}
-static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
+static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
gpointer data)
{
OtherPage *prefs_other = (OtherPage *) _page;
-
+
GtkWidget *vbox1;
GtkWidget *hbox1;
GtkWidget *frame_addr;
GtkWidget *vbox_addr;
GtkWidget *checkbtn_addaddrbyclick;
-
+
GtkWidget *frame_exit;
GtkWidget *vbox_exit;
GtkWidget *checkbtn_confonexit;
@@ -382,12 +376,10 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
GtkWidget *flush_metadata_faster_radiobtn;
GtkWidget *flush_metadata_safer_radiobtn;
-#ifndef PASSWORD_CRYPTO_OLD
GtkWidget *vbox_passphrase;
GtkWidget *frame_passphrase;
GtkWidget *checkbtn_use_passphrase;
GtkWidget *button_change_passphrase;
-#endif
gchar *shred_binary = NULL;
@@ -455,7 +447,7 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_box_pack_start (GTK_BOX (vbox_metadata), hbox1, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox1), flush_metadata_safer_radiobtn, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox1), flush_metadata_faster_radiobtn, FALSE, FALSE, 0);
-
+
if (prefs_common.flush_metadata)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(flush_metadata_safer_radiobtn), TRUE);
else
@@ -492,7 +484,7 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
CLAWS_SET_TIP(checkbtn_transhdr,
_("The display of standard headers (such as 'From:', 'Subject:') "
"will be translated into your language"));
- PACK_CHECK_BUTTON (vbox2, checkbtn_askonclean,
+ PACK_CHECK_BUTTON (vbox2, checkbtn_askonclean,
_("Ask before emptying trash"));
PACK_CHECK_BUTTON (vbox2, checkbtn_askonfilter,
_("Ask about account specific filtering rules when "
@@ -541,7 +533,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
g_free(buf);
}
-#ifndef PASSWORD_CRYPTO_OLD
vbox_passphrase = gtkut_get_options_frame(vbox1, &frame_passphrase, _("Primary passphrase"));
PACK_CHECK_BUTTON(vbox_passphrase, checkbtn_use_passphrase,
@@ -563,17 +554,16 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
SET_TOGGLE_SENSITIVITY (checkbtn_use_passphrase, button_change_passphrase);
g_signal_connect (G_OBJECT (button_change_passphrase), "clicked",
G_CALLBACK (prefs_change_primary_passphrase), NULL);
-#endif
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_addaddrbyclick),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_addaddrbyclick),
prefs_common.add_address_by_click);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_confonexit),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_confonexit),
prefs_common.confirm_on_exit);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_cleanonexit),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_cleanonexit),
prefs_common.clean_on_exit);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_askonclean),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_askonclean),
prefs_common.ask_on_clean);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_warnqueued),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_warnqueued),
prefs_common.warn_queued_on_exit);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_gtk_enable_accels),
prefs_common.gtk_enable_accels);
@@ -584,19 +574,17 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_transhdr),
prefs_common.trans_hdr);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_askonfilter),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_askonfilter),
prefs_common.ask_apply_per_account_filtering_rules);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_use_shred),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_use_shred),
prefs_common.use_shred);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_real_time_sync),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_real_time_sync),
prefs_common.real_time_sync);
-#ifndef PASSWORD_CRYPTO_OLD
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_use_passphrase),
prefs_common.use_primary_passphrase);
gtk_widget_set_sensitive(button_change_passphrase,
prefs_common.use_primary_passphrase);
-#endif
prefs_other->keys_preset_hbox = keys_preset_hbox;
prefs_other->keys_preset_combo = keys_preset_combo;
@@ -614,9 +602,7 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
prefs_other->entry_attach_save_chmod = entry_attach_save_chmod;
prefs_other->flush_metadata_safer_radiobtn = flush_metadata_safer_radiobtn;
prefs_other->flush_metadata_faster_radiobtn = flush_metadata_faster_radiobtn;
-#ifndef PASSWORD_CRYPTO_OLD
prefs_other->checkbtn_use_passphrase = checkbtn_use_passphrase;
-#endif
prefs_other->page.widget = vbox1;
}
@@ -632,11 +618,11 @@ static void prefs_other_save(PrefsPage *_page)
prefs_common.confirm_on_exit = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_confonexit));
prefs_common.clean_on_exit = gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(page->checkbtn_cleanonexit));
+ GTK_TOGGLE_BUTTON(page->checkbtn_cleanonexit));
prefs_common.ask_on_clean = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_askonclean));
prefs_common.warn_queued_on_exit = gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(page->checkbtn_warnqueued));
+ GTK_TOGGLE_BUTTON(page->checkbtn_warnqueued));
prefs_common.io_timeout_secs = gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON(page->spinbtn_iotimeout));
prefs_common.flush_metadata = gtk_toggle_button_get_active(
@@ -647,13 +633,13 @@ static void prefs_other_save(PrefsPage *_page)
#endif
prefs_common.trans_hdr = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_transhdr));
- prefs_common.ask_apply_per_account_filtering_rules =
+ prefs_common.ask_apply_per_account_filtering_rules =
gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(page->checkbtn_askonfilter));
- prefs_common.use_shred =
+ GTK_TOGGLE_BUTTON(page->checkbtn_askonfilter));
+ prefs_common.use_shred =
gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(page->checkbtn_use_shred));
- prefs_common.real_time_sync =
+ GTK_TOGGLE_BUTTON(page->checkbtn_use_shred));
+ prefs_common.real_time_sync =
gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_real_time_sync));
@@ -663,7 +649,6 @@ static void prefs_other_save(PrefsPage *_page)
prefs_keybind_preset_changed(GTK_COMBO_BOX(page->keys_preset_combo));
-#ifndef PASSWORD_CRYPTO_OLD
/* If we're disabling use of primary passphrase, we need to reencrypt
* all account passwords with hardcoded key. */
if (!gtk_toggle_button_get_active(
@@ -697,7 +682,6 @@ static void prefs_other_save(PrefsPage *_page)
prefs_common.use_primary_passphrase =
gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_use_passphrase));
-#endif
gtk_enable_accels = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_gtk_enable_accels));
@@ -712,8 +696,8 @@ static void prefs_other_save(PrefsPage *_page)
(glong)prefs_common.gtk_enable_accels,
NULL);
}
-
- if (prefs_common.gtk_enable_accels != gtk_enable_accels) {
+
+ if (prefs_common.gtk_enable_accels != gtk_enable_accels) {
/* gtk_can_change_accels value changed : we have (only if changed)
* to apply the gtk property to all widgets : */
gtk_rc_reparse_all_for_settings(gtk_settings_get_default(), TRUE);
@@ -759,10 +743,8 @@ void prefs_other_done(void)
g_free(prefs_other);
}
-#ifndef PASSWORD_CRYPTO_OLD
void prefs_change_primary_passphrase(GtkButton *button, gpointer data)
{
/* Call the passphrase change dialog */
primary_passphrase_change_dialog();
}
-#endif