summaryrefslogtreecommitdiff
path: root/mu
diff options
context:
space:
mode:
authordjcb <djcb@djcbsoftware.nl>2016-07-24 16:00:04 +0300
committerdjcb <djcb@djcbsoftware.nl>2016-07-24 16:00:04 +0300
commitc9f8ac5bebb77d4e5dcfb7ebea98f47c964a5e6a (patch)
treeffc2f10f26b353e3165166b13766e24e4df744fa /mu
parent538b7e52920302e4e2b9e2800e5ac1843383225e (diff)
crypto: prefer gpg2
Can't say I fully understand what's going on, but it seems gpg-before-2 has some trouble with its agent, at least when using gnome-session (which stopped using gnome-keyring as a gpg-agent since Fedora 23 at least). Sanity seems to be restored when preferring gpg2 instead. "gpg" is used when gpg2 isn't there; and there's the MU_GPG_PATH env variable to override all of that.
Diffstat (limited to 'mu')
-rw-r--r--mu/mu-cmd.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mu/mu-cmd.c b/mu/mu-cmd.c
index 7cc1b78..04bb37c 100644
--- a/mu/mu-cmd.c
+++ b/mu/mu-cmd.c
@@ -1,6 +1,6 @@
/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/
/*
-** Copyright (C) 2010-2013 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
+** Copyright (C) 2010-2016 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** 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
@@ -80,10 +80,14 @@ each_part (MuMsg *msg, MuMsgPart *part, gchar **attach)
static gchar *
get_attach_str (MuMsg *msg, MuConfig *opts)
{
- gchar *attach;
+ gchar *attach;
+ MuMsgOptions msgopts;
+
+ msgopts = mu_config_get_msg_options(opts) |
+ MU_MSG_OPTION_CONSOLE_PASSWORD;
attach = NULL;
- mu_msg_part_foreach (msg, mu_config_get_msg_options(opts),
+ mu_msg_part_foreach (msg, msgopts,
(MuMsgPartForeachFunc)each_part, &attach);
return attach;
}
@@ -494,7 +498,9 @@ mu_cmd_verify (MuConfig *opts, GError **err)
if (!msg)
return MU_ERROR;
- msgopts = mu_config_get_msg_options (opts) | MU_MSG_OPTION_VERIFY;
+ msgopts = mu_config_get_msg_options (opts)
+ | MU_MSG_OPTION_VERIFY
+ | MU_MSG_OPTION_CONSOLE_PASSWORD;
vdata.report = NULL;
vdata.combined_status = MU_MSG_PART_SIG_STATUS_UNSIGNED;