NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
DOXYGEN
dlg_gpgme.c File Reference

GPGME Key Selection Dialog. More...

#include "config.h"
#include <ctype.h>
#include <gpgme.h>
#include <locale.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "private.h"
#include "mutt/lib.h"
#include "address/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "lib.h"
#include "menu/lib.h"
#include "crypt_gpgme.h"
#include "format_flags.h"
#include "gpgme_functions.h"
#include "keymap.h"
#include "mutt_logging.h"
#include "muttlib.h"
#include "opcodes.h"
#include <libintl.h>
+ Include dependency graph for dlg_gpgme.c:

Go to the source code of this file.

Data Structures

struct  CryptEntry
 An entry in the Select-Key menu. More...
 

Functions

static int crypt_compare_key_address (const void *a, const void *b)
 Compare Key addresses and IDs for sorting. More...
 
static int crypt_compare_address_qsort (const void *a, const void *b)
 Compare the addresses of two keys. More...
 
static int crypt_compare_keyid (const void *a, const void *b)
 Compare Key IDs and addresses for sorting. More...
 
static int crypt_compare_keyid_qsort (const void *a, const void *b)
 Compare the IDs of two keys. More...
 
static int crypt_compare_key_date (const void *a, const void *b)
 Compare Key creation dates and addresses for sorting. More...
 
static int crypt_compare_date_qsort (const void *a, const void *b)
 Compare the dates of two keys. More...
 
static int crypt_compare_key_trust (const void *a, const void *b)
 Compare the trust of keys for sorting. More...
 
static int crypt_compare_trust_qsort (const void *a, const void *b)
 Compare the trust levels of two keys. More...
 
static char * crypt_key_abilities (KeyFlags flags)
 Parse key flags into a string. More...
 
static char crypt_flags (KeyFlags flags)
 Parse the key flags into a single character. More...
 
static const char * crypt_format_str (char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)
 Format a string for the key selection menu - Implements format_t -. More...
 
static void crypt_make_entry (struct Menu *menu, char *buf, size_t buflen, int line)
 Format a menu item for the key selection list - Implements Menu::make_entry() -. More...
 
static void gpgme_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -. More...
 
static int gpgme_key_config_observer (struct NotifyCallback *nc)
 Notification that a Config Variable has changed - Implements observer_t -. More...
 
static int gpgme_key_window_observer (struct NotifyCallback *nc)
 Notification that a Window has changed - Implements observer_t -. More...
 
struct CryptKeyInfodlg_select_gpgme_key (struct CryptKeyInfo *keys, struct Address *p, const char *s, unsigned int app, bool *forced_valid)
 Get the user to select a key. More...
 

Variables

static const struct Mapping GpgmeHelp []
 Help Bar for the GPGME key selection dialog. More...
 

Detailed Description

GPGME Key Selection Dialog.

Authors
  • Richard Russon

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 GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file dlg_gpgme.c.

Function Documentation

◆ crypt_compare_key_address()

static int crypt_compare_key_address ( const void *  a,
const void *  b 
)
static

Compare Key addresses and IDs for sorting.

Parameters
aFirst key
bSecond key
Return values
-1a precedes b
0a and b are identical
1b precedes a

Definition at line 124 of file dlg_gpgme.c.

125{
126 struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
127 struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
128
129 int r = mutt_istr_cmp((*s)->uid, (*t)->uid);
130 if (r != 0)
131 return r > 0;
133}
const char * crypt_fpr_or_lkeyid(struct CryptKeyInfo *k)
Find the fingerprint of a key.
Definition: crypt_gpgme.c:214
int mutt_istr_cmp(const char *a, const char *b)
Compare two strings ignoring case, safely.
Definition: string.c:483
A stored PGP key.
Definition: crypt_gpgme.h:44
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_compare_address_qsort()

static int crypt_compare_address_qsort ( const void *  a,
const void *  b 
)
static

Compare the addresses of two keys.

Parameters
aFirst key
bSecond key
Return values
-1a precedes b
0a and b are identical
1b precedes a

Definition at line 143 of file dlg_gpgme.c.

144{
145 const short c_pgp_sort_keys = cs_subset_sort(NeoMutt->sub, "pgp_sort_keys");
146 return (c_pgp_sort_keys & SORT_REVERSE) ? !crypt_compare_key_address(a, b) :
148}
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
Definition: helpers.c:292
static int crypt_compare_key_address(const void *a, const void *b)
Compare Key addresses and IDs for sorting.
Definition: dlg_gpgme.c:124
#define SORT_REVERSE
Reverse the order of the sort.
Definition: sort2.h:79
Container for Accounts, Notifications.
Definition: neomutt.h:37
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_compare_keyid()

static int crypt_compare_keyid ( const void *  a,
const void *  b 
)
static

Compare Key IDs and addresses for sorting.

Parameters
aFirst key ID
bSecond key ID
Return values
-1a precedes b
0a and b are identical
1b precedes a

Definition at line 158 of file dlg_gpgme.c.

159{
160 struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
161 struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
162
164 if (r != 0)
165 return r > 0;
166 return mutt_istr_cmp((*s)->uid, (*t)->uid) > 0;
167}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_compare_keyid_qsort()

static int crypt_compare_keyid_qsort ( const void *  a,
const void *  b 
)
static

Compare the IDs of two keys.

Parameters
aFirst key ID
bSecond key ID
Return values
-1a precedes b
0a and b are identical
1b precedes a

Definition at line 177 of file dlg_gpgme.c.

178{
179 const short c_pgp_sort_keys = cs_subset_sort(NeoMutt->sub, "pgp_sort_keys");
180 return (c_pgp_sort_keys & SORT_REVERSE) ? !crypt_compare_keyid(a, b) :
182}
static int crypt_compare_keyid(const void *a, const void *b)
Compare Key IDs and addresses for sorting.
Definition: dlg_gpgme.c:158
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_compare_key_date()

static int crypt_compare_key_date ( const void *  a,
const void *  b 
)
static

Compare Key creation dates and addresses for sorting.

Parameters
aFirst key
bSecond key
Return values
-1a precedes b
0a and b are identical
1b precedes a

Definition at line 192 of file dlg_gpgme.c.

193{
194 struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
195 struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
196 unsigned long ts = 0, tt = 0;
197
198 if ((*s)->kobj->subkeys && ((*s)->kobj->subkeys->timestamp > 0))
199 ts = (*s)->kobj->subkeys->timestamp;
200 if ((*t)->kobj->subkeys && ((*t)->kobj->subkeys->timestamp > 0))
201 tt = (*t)->kobj->subkeys->timestamp;
202
203 if (ts > tt)
204 return 1;
205 if (ts < tt)
206 return 0;
207
208 return mutt_istr_cmp((*s)->uid, (*t)->uid) > 0;
209}
gpgme_key_t kobj
Definition: crypt_gpgme.h:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_compare_date_qsort()

static int crypt_compare_date_qsort ( const void *  a,
const void *  b 
)
static

Compare the dates of two keys.

Parameters
aFirst key
bSecond key
Return values
-1a precedes b
0a and b are identical
1b precedes a

Definition at line 219 of file dlg_gpgme.c.

220{
221 const short c_pgp_sort_keys = cs_subset_sort(NeoMutt->sub, "pgp_sort_keys");
222 return (c_pgp_sort_keys & SORT_REVERSE) ? !crypt_compare_key_date(a, b) :
224}
static int crypt_compare_key_date(const void *a, const void *b)
Compare Key creation dates and addresses for sorting.
Definition: dlg_gpgme.c:192
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_compare_key_trust()

static int crypt_compare_key_trust ( const void *  a,
const void *  b 
)
static

Compare the trust of keys for sorting.

Parameters
aFirst key
bSecond key
Return values
-1a precedes b
0a and b are identical
1b precedes a

Compare two trust values, the key length, the creation dates. the addresses and the key IDs.

Definition at line 237 of file dlg_gpgme.c.

238{
239 struct CryptKeyInfo **s = (struct CryptKeyInfo **) a;
240 struct CryptKeyInfo **t = (struct CryptKeyInfo **) b;
241 unsigned long ts = 0, tt = 0;
242
243 int r = (((*s)->flags & KEYFLAG_RESTRICTIONS) - ((*t)->flags & KEYFLAG_RESTRICTIONS));
244 if (r != 0)
245 return r > 0;
246
247 ts = (*s)->validity;
248 tt = (*t)->validity;
249 r = (tt - ts);
250 if (r != 0)
251 return r < 0;
252
253 if ((*s)->kobj->subkeys)
254 ts = (*s)->kobj->subkeys->length;
255 if ((*t)->kobj->subkeys)
256 tt = (*t)->kobj->subkeys->length;
257 if (ts != tt)
258 return ts > tt;
259
260 if ((*s)->kobj->subkeys && ((*s)->kobj->subkeys->timestamp > 0))
261 ts = (*s)->kobj->subkeys->timestamp;
262 if ((*t)->kobj->subkeys && ((*t)->kobj->subkeys->timestamp > 0))
263 tt = (*t)->kobj->subkeys->timestamp;
264 if (ts > tt)
265 return 1;
266 if (ts < tt)
267 return 0;
268
269 r = mutt_istr_cmp((*s)->uid, (*t)->uid);
270 if (r != 0)
271 return r > 0;
273}
#define KEYFLAG_RESTRICTIONS
Definition: lib.h:140
gpgme_validity_t validity
uid validity (cached for convenience)
Definition: crypt_gpgme.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_compare_trust_qsort()

static int crypt_compare_trust_qsort ( const void *  a,
const void *  b 
)
static

Compare the trust levels of two keys.

Parameters
aFirst key
bSecond key
Return values
-1a precedes b
0a and b are identical
1b precedes a

Definition at line 283 of file dlg_gpgme.c.

284{
285 const short c_pgp_sort_keys = cs_subset_sort(NeoMutt->sub, "pgp_sort_keys");
286 return (c_pgp_sort_keys & SORT_REVERSE) ? !crypt_compare_key_trust(a, b) :
288}
static int crypt_compare_key_trust(const void *a, const void *b)
Compare the trust of keys for sorting.
Definition: dlg_gpgme.c:237
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crypt_key_abilities()

static char * crypt_key_abilities ( KeyFlags  flags)
static

Parse key flags into a string.

Parameters
flagsFlags, see KeyFlags
Return values
ptrFlag string
Note
The string is statically allocated.

Definition at line 297 of file dlg_gpgme.c.

298{
299 static char buf[3];
300
301 if (!(flags & KEYFLAG_CANENCRYPT))
302 buf[0] = '-';
303 else if (flags & KEYFLAG_PREFER_SIGNING)
304 buf[0] = '.';
305 else
306 buf[0] = 'e';
307
308 if (!(flags & KEYFLAG_CANSIGN))
309 buf[1] = '-';
310 else if (flags & KEYFLAG_PREFER_ENCRYPTION)
311 buf[1] = '.';
312 else
313 buf[1] = 's';
314
315 buf[2] = '\0';
316
317 return buf;
318}
#define KEYFLAG_CANENCRYPT
Key is suitable for encryption.
Definition: lib.h:128
#define KEYFLAG_PREFER_SIGNING
Key's owner prefers signing.
Definition: lib.h:137
#define KEYFLAG_PREFER_ENCRYPTION
Key's owner prefers encryption.
Definition: lib.h:136
#define KEYFLAG_CANSIGN
Key is suitable for signing.
Definition: lib.h:127
+ Here is the caller graph for this function:

◆ crypt_flags()

static char crypt_flags ( KeyFlags  flags)
static

Parse the key flags into a single character.

Parameters
flagsFlags, see KeyFlags
Return values
charFlag character

The returned character describes the most important flag.

Definition at line 327 of file dlg_gpgme.c.

328{
329 if (flags & KEYFLAG_REVOKED)
330 return 'R';
331 if (flags & KEYFLAG_EXPIRED)
332 return 'X';
333 if (flags & KEYFLAG_DISABLED)
334 return 'd';
335 if (flags & KEYFLAG_CRITICAL)
336 return 'c';
337
338 return ' ';
339}
#define KEYFLAG_EXPIRED
Key is expired.
Definition: lib.h:131
#define KEYFLAG_CRITICAL
Key is marked critical.
Definition: lib.h:135
#define KEYFLAG_DISABLED
Key is marked disabled.
Definition: lib.h:133
#define KEYFLAG_REVOKED
Key is revoked.
Definition: lib.h:132
+ Here is the caller graph for this function:

◆ dlg_select_gpgme_key()

struct CryptKeyInfo * dlg_select_gpgme_key ( struct CryptKeyInfo keys,
struct Address p,
const char *  s,
unsigned int  app,
bool *  forced_valid 
)

Get the user to select a key.

Parameters
[in]keysList of keys to select from
[in]pAddress to match
[in]sReal name to display
[in]appFlags, e.g. APPLICATION_PGP
[out]forced_validSet to true if user overrode key's validity
Return values
ptrKey selected by user

Display a menu to select a key from the array of keys.

Definition at line 665 of file dlg_gpgme.c.

668{
669 int keymax;
670 int i;
671 int (*f)(const void *, const void *);
672 enum MenuType menu_to_use = MENU_GENERIC;
673 bool unusable = false;
674
675 /* build the key table */
676 keymax = 0;
677 i = 0;
678 struct CryptKeyInfo **key_table = NULL;
679 for (struct CryptKeyInfo *k = keys; k; k = k->next)
680 {
681 const bool c_pgp_show_unusable = cs_subset_bool(NeoMutt->sub, "pgp_show_unusable");
682 if (!c_pgp_show_unusable && (k->flags & KEYFLAG_CANTUSE))
683 {
684 unusable = true;
685 continue;
686 }
687
688 if (i == keymax)
689 {
690 keymax += 20;
691 mutt_mem_realloc(&key_table, sizeof(struct CryptKeyInfo *) * keymax);
692 }
693
694 key_table[i++] = k;
695 }
696
697 if (!i && unusable)
698 {
699 mutt_error(_("All matching keys are marked expired/revoked"));
700 return NULL;
701 }
702
703 const short c_pgp_sort_keys = cs_subset_sort(NeoMutt->sub, "pgp_sort_keys");
704 switch (c_pgp_sort_keys & SORT_MASK)
705 {
706 case SORT_ADDRESS:
708 break;
709 case SORT_DATE:
711 break;
712 case SORT_KEYID:
714 break;
715 case SORT_TRUST:
716 default:
718 break;
719 }
720 qsort(key_table, i, sizeof(struct CryptKeyInfo *), f);
721
722 if (app & APPLICATION_PGP)
723 menu_to_use = MENU_KEY_SELECT_PGP;
724 else if (app & APPLICATION_SMIME)
725 menu_to_use = MENU_KEY_SELECT_SMIME;
726
727 struct MuttWindow *dlg = simple_dialog_new(menu_to_use, WT_DLG_CRYPT_GPGME, GpgmeHelp);
728
729 struct Menu *menu = dlg->wdata;
730 menu->max = i;
732 menu->mdata = key_table;
734
735 struct GpgmeData gd = { false, menu, key_table, NULL, forced_valid };
736 dlg->wdata = &gd;
737
738 // NT_COLOR is handled by the SimpleDialog
741
742 {
743 const char *ts = NULL;
744
745 if ((app & APPLICATION_PGP) && (app & APPLICATION_SMIME))
746 ts = _("PGP and S/MIME keys matching");
747 else if ((app & APPLICATION_PGP))
748 ts = _("PGP keys matching");
749 else if ((app & APPLICATION_SMIME))
750 ts = _("S/MIME keys matching");
751 else
752 ts = _("keys matching");
753
754 char buf[1024] = { 0 };
755 if (p)
756 {
757 /* L10N: 1$s is one of the previous four entries.
758 %2$s is an address.
759 e.g. "S/MIME keys matching <me@mutt.org>" */
760 snprintf(buf, sizeof(buf), _("%s <%s>"), ts, p->mailbox);
761 }
762 else
763 {
764 /* L10N: e.g. 'S/MIME keys matching "Michael Elkins".' */
765 snprintf(buf, sizeof(buf), _("%s \"%s\""), ts, s);
766 }
767
768 struct MuttWindow *sbar = window_find_child(dlg, WT_STATUS_BAR);
769 sbar_set_title(sbar, buf);
770 }
771
773
774 // ---------------------------------------------------------------------------
775 // Event Loop
776 int op = OP_NULL;
777 do
778 {
779 menu_tagging_dispatcher(menu->win, op);
780 window_redraw(NULL);
781
782 op = km_dokey(menu_to_use);
783 mutt_debug(LL_DEBUG1, "Got op %s (%d)\n", opcodes_get_name(op), op);
784 if (op < 0)
785 continue;
786 if (op == OP_NULL)
787 {
788 km_error_key(menu_to_use);
789 continue;
790 }
792
793 int rc = gpgme_function_dispatcher(dlg, op);
794
795 if (rc == FR_UNKNOWN)
796 rc = menu_function_dispatcher(menu->win, op);
797 if (rc == FR_UNKNOWN)
798 rc = global_function_dispatcher(NULL, op);
799 } while (!gd.done);
800 // ---------------------------------------------------------------------------
801
802 simple_dialog_free(&dlg);
803 return gd.key;
804}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:73
@ FR_UNKNOWN
Unknown function.
Definition: dispatcher.h:33
static int crypt_compare_date_qsort(const void *a, const void *b)
Compare the dates of two keys.
Definition: dlg_gpgme.c:219
static int crypt_compare_keyid_qsort(const void *a, const void *b)
Compare the IDs of two keys.
Definition: dlg_gpgme.c:177
static int crypt_compare_address_qsort(const void *a, const void *b)
Compare the addresses of two keys.
Definition: dlg_gpgme.c:143
static int crypt_compare_trust_qsort(const void *a, const void *b)
Compare the trust levels of two keys.
Definition: dlg_gpgme.c:283
static const struct Mapping GpgmeHelp[]
Help Bar for the GPGME key selection dialog.
Definition: dlg_gpgme.c:97
int gpgme_function_dispatcher(struct MuttWindow *win, int op)
Perform a Gpgme function - Implements function_dispatcher_t -.
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
Definition: tagging.c:223
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
Definition: global.c:164
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
Definition: functions.c:320
#define mutt_error(...)
Definition: logging.h:87
#define mutt_debug(LEVEL,...)
Definition: logging.h:84
static void crypt_make_entry(struct Menu *menu, char *buf, size_t buflen, int line)
Format a menu item for the key selection list - Implements Menu::make_entry() -.
Definition: dlg_gpgme.c:576
static void gpgme_key_table_free(struct Menu *menu, void **ptr)
Free the key table - Implements Menu::mdata_free() -.
Definition: dlg_gpgme.c:594
static int gpgme_key_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition: dlg_gpgme.c:602
static int gpgme_key_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition: dlg_gpgme.c:631
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
Definition: simple.c:166
struct MuttWindow * simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
Definition: simple.c:129
int km_dokey(enum MenuType mtype)
Determine what a keypress should do.
Definition: keymap.c:795
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
Definition: keymap.c:1061
@ LL_DEBUG1
Log at debug level 1.
Definition: logging.h:40
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
Definition: memory.c:114
#define _(a)
Definition: message.h:28
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:189
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:74
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
Definition: mutt_window.c:604
struct MuttWindow * window_find_child(struct MuttWindow *win, enum WindowType type)
Recursively find a child Window of a given type.
Definition: mutt_window.c:522
@ WT_DLG_CRYPT_GPGME
Crypt-GPGME Dialog, dlg_select_gpgme_key()
Definition: mutt_window.h:83
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
Definition: mutt_window.h:102
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:90
#define KEYFLAG_CANTUSE
Definition: lib.h:139
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:91
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:55
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:43
const char * opcodes_get_name(int op)
Get the name of an opcode.
Definition: opcodes.c:46
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
Definition: sbar.c:224
#define SORT_MASK
Mask for the sort id.
Definition: sort2.h:78
@ SORT_TRUST
Sort by encryption key's trust level.
Definition: sort2.h:56
@ SORT_KEYID
Sort by the encryption key's ID.
Definition: sort2.h:55
@ SORT_DATE
Sort by the date the email was sent.
Definition: sort2.h:43
@ SORT_ADDRESS
Sort by email address.
Definition: sort2.h:54
char * mailbox
Mailbox and host address.
Definition: address.h:38
struct CryptKeyInfo * next
Linked list.
Definition: crypt_gpgme.h:45
Data to pass to the Gpgme Functions.
bool * forced_valid
User insists on out-of-date key.
struct CryptKeyInfo * key
Selected Key.
struct CryptKeyInfo ** key_table
Array of Keys.
bool done
Should we close the Dialog?
struct Menu * menu
Gpgme Menu.
Definition: lib.h:69
struct MuttWindow * win
Window holding the Menu.
Definition: lib.h:76
void(* make_entry)(struct Menu *menu, char *buf, size_t buflen, int line)
Definition: lib.h:96
void(* mdata_free)(struct Menu *menu, void **ptr)
Definition: lib.h:152
void * mdata
Private data.
Definition: lib.h:137
int max
Number of entries in the menu.
Definition: lib.h:71
void * wdata
Private data.
Definition: mutt_window.h:145
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Definition: mutt_window.h:138
struct Notify * notify
Notifications handler.
Definition: neomutt.h:38
MenuType
Types of GUI selections.
Definition: type.h:36
@ MENU_KEY_SELECT_PGP
Select a PGP key.
Definition: type.h:47
@ MENU_KEY_SELECT_SMIME
Select a SMIME key.
Definition: type.h:48
@ MENU_GENERIC
Generic selection list.
Definition: type.h:45
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ GpgmeHelp

const struct Mapping GpgmeHelp[]
static
Initial value:
= {
{ N_("Exit"), OP_EXIT },
{ N_("Select"), OP_GENERIC_SELECT_ENTRY },
{ N_("Check key"), OP_VERIFY_KEY },
{ N_("Help"), OP_HELP },
{ NULL, 0 },
}
#define N_(a)
Definition: message.h:32

Help Bar for the GPGME key selection dialog.

Definition at line 97 of file dlg_gpgme.c.