96 {
N_(
"Exit"), OP_EXIT },
97 {
N_(
"Select"), OP_GENERIC_SELECT_ENTRY },
98 {
N_(
"Check key"), OP_VERIFY_KEY },
99 {
N_(
"Help"), OP_HELP },
112 struct PgpUid const *s = *(
struct PgpUid const *
const *) a;
113 struct PgpUid const *t = *(
struct PgpUid const *
const *) b;
114 const bool sort_reverse = *(
bool *) sdata;
123 return sort_reverse ? -rc : rc;
131 struct PgpUid const *s = *(
struct PgpUid const *
const *) a;
132 struct PgpUid const *t = *(
struct PgpUid const *
const *) b;
133 const bool sort_reverse = *(
bool *) sdata;
142 return sort_reverse ? -rc : rc;
150 struct PgpUid const *s = *(
struct PgpUid const *
const *) a;
151 struct PgpUid const *t = *(
struct PgpUid const *
const *) b;
152 const bool sort_reverse = *(
bool *) sdata;
161 return sort_reverse ? -rc : rc;
169 struct PgpUid const *s = *(
struct PgpUid const *
const *) a;
170 struct PgpUid const *t = *(
struct PgpUid const *
const *) b;
171 const bool sort_reverse = *(
bool *) sdata;
200 return sort_reverse ? -rc : rc;
258 const struct PgpEntry *entry = data;
274 const struct PgpEntry *entry = data;
278 bool use_c_locale =
false;
279 const char *text = node->
text;
286 char tmp[128] = { 0 };
307 const struct PgpEntry *entry = data;
321 const struct PgpEntry *entry = data;
335 const struct PgpEntry *entry = data;
338 const char *s = uid->
addr;
350 const struct PgpEntry *entry = data;
366 const struct PgpEntry *entry = data;
383 const struct PgpEntry *entry = data;
401 const struct PgpEntry *entry = data;
420 const struct PgpEntry *entry = data;
437 const struct PgpEntry *entry = data;
455 const struct PgpEntry *entry = data;
471 const struct PgpEntry *entry = data;
487 const struct PgpEntry *entry = data;
503 const struct PgpEntry *entry = data;
534 struct PgpEntry entry = { line + 1, *puid };
592 if (ev_w->
win != win_menu)
615 struct Menu *menu = NULL;
616 char buf[1024] = { 0 };
617 bool unusable =
false;
629 for (
struct PgpUid *a = kp->address; a; a = a->
next)
643 mutt_error(
_(
"All matching keys are expired, revoked, or disabled"));
688 snprintf(buf,
sizeof(buf),
_(
"PGP keys matching \"%s\""), s);
753 { -1, -1, NULL, NULL },
#define ARRAY_SORT(head, fn, sdata)
Sort an array.
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_FREE(head)
Release all memory.
#define ARRAY_GET(head, idx)
Return the element at index.
#define ARRAY_HEAD_INITIALIZER
Static initializer for arrays.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
@ FR_UNKNOWN
Unknown function.
static char pgp_flags(KeyFlags flags)
Turn PGP key flags into a string.
static const struct Mapping PgpHelp[]
Help Bar for the PGP key selection dialog.
static const char TrustFlags[]
Characters used to show the trust level for PGP keys.
const struct ExpandoRenderData PgpEntryRenderData[]
PgpEntryRenderData- Callbacks for PGP Key Expandos.
static char * pgp_key_abilities(KeyFlags flags)
Turn PGP key abilities into a string.
@ ED_PGP
Pgp ED_PGP_ ExpandoDataPgp.
@ ED_PGP_KEY
Pgp_Key ED_PGK_ ExpandoDataPgpKey.
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
int km_dokey(enum MenuType mtype, GetChFlags flags)
Determine what a keypress should do.
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
int pgp_function_dispatcher(struct MuttWindow *win, int op)
Perform a Pgp function - Implements function_dispatcher_t -.
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
long pgp_entry_pgp_l_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
PGP: Key length - Implements ExpandoRenderData::get_number() -.
long pgp_entry_pgp_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
PGP: Index number - Implements ExpandoRenderData::get_number() -.
long pgp_entry_pgp_date_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
PGP: Date of the key - Implements ExpandoRenderData::get_number() -.
long pgp_entry_pgp_L_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
PGP: Principal Key length - Implements ExpandoRenderData::get_number() -.
void pgp_entry_pgp_A(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Principal Key Algorithm - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_F(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Principal Key Flags - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_K(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Principal Key id - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_date(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Date of the key - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_k(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Key id - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_t(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Trust/validity - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_c(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Key Capabilities - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_C(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Principal Key Capabilities - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Key Flags - Implements ExpandoRenderData::get_string() -.
void pgp_entry_ignore(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Field not supported - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_u(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: User id - Implements ExpandoRenderData::get_string() -.
void pgp_entry_pgp_a(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
PGP: Key Algorithm - Implements ExpandoRenderData::get_string() -.
struct PgpKeyInfo * dlg_pgp(struct PgpKeyInfo *keys, struct Address *p, const char *s)
Let the user select a key to use -.
#define mutt_debug(LEVEL,...)
static int pgp_key_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int pgp_key_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
static int pgp_sort_trust(const void *a, const void *b, void *sdata)
Compare two keys by their trust levels - Implements sort_t -.
static int pgp_sort_keyid(const void *a, const void *b, void *sdata)
Compare two keys by their IDs - Implements sort_t -.
static int pgp_sort_date(const void *a, const void *b, void *sdata)
Compare two keys by their dates - Implements sort_t -.
static int pgp_sort_address(const void *a, const void *b, void *sdata)
Compare two keys by their addresses - Implements sort_t -.
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
struct SimpleDialogWindows simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
#define GETCH_NO_FLAGS
No flags are set.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
size_t mutt_date_localtime_format(char *buf, size_t buflen, const char *format, time_t t)
Format localtime.
size_t mutt_date_localtime_format_locale(char *buf, size_t buflen, const char *format, time_t t, locale_t loc)
Format localtime using a given locale.
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
int mutt_istr_cmp(const char *a, const char *b)
Compare two strings ignoring case, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
@ WT_DLG_PGP
Pgp Dialog, dlg_pgp()
@ NT_WINDOW_DELETE
Window is about to be deleted.
#define KEYFLAG_EXPIRED
Key is expired.
uint16_t KeyFlags
Flags describing PGP/SMIME keys, e.g. KEYFLAG_CANSIGN.
#define KEYFLAG_RESTRICTIONS
#define KEYFLAG_CANENCRYPT
Key is suitable for encryption.
#define KEYFLAG_PREFER_SIGNING
Key's owner prefers signing.
#define KEYFLAG_CRITICAL
Key is marked critical.
#define KEYFLAG_DISABLED
Key is marked disabled.
#define KEYFLAG_REVOKED
Key is revoked.
#define KEYFLAG_PREFER_ENCRYPTION
Key's owner prefers encryption.
#define KEYFLAG_CANSIGN
Key is suitable for signing.
@ ED_PGP_NUMBER
PgpEntry.num.
@ ED_PGP_USER_ID
PgpUid.addr.
@ ED_PGP_TRUST
PgpUid, TrustFlags.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
const char * opcodes_get_name(int op)
Get the name of an opcode.
char * pgp_this_keyid(struct PgpKeyInfo *k)
Get the ID of this key.
char * pgp_fpr_or_lkeyid(struct PgpKeyInfo *k)
Get the fingerprint or long keyid.
PGP sign, encrypt, check routines.
struct PgpKeyInfo * pgp_principal_key(struct PgpKeyInfo *key)
Get the main (parent) PGP key.
PGP key management routines.
Misc PGP helper routines.
@ ED_PGK_KEY_CAPABILITIES
PgpKeyInfo.flags, pgp_key_abilities()
@ ED_PGK_KEY_FINGERPRINT
PgpKeyInfo.fingerprint.
@ ED_PGK_PKEY_LENGTH
pgp_principal_key(), PgpKeyInfo.keylen
@ ED_PGK_PKEY_ALGORITHM
pgp_principal_key(), PgpKeyInfo.algorithm
@ ED_PGK_DATE
PgpKeyInfo.gen_time.
@ ED_PGK_PKEY_FINGERPRINT
pgp_principal_key(), PgpKeyInfo.fingerprint
@ ED_PGK_KEY_ID
PgpKeyInfo, pgp_this_keyid()
@ ED_PGK_PROTOCOL
PgpKeyInfo.
@ ED_PGK_PKEY_CAPABILITIES
pgp_principal_key(), PgpKeyInfo.flags, pgp_key_abilities()
@ ED_PGK_KEY_FLAGS
PgpKeyInfo.kflags, pgp_flags()
@ ED_PGK_PKEY_ID
pgp_principal_key(), PgpKeyInfo, pgp_this_keyid()
@ ED_PGK_KEY_ALGORITHM
PgpKeyInfo.algorithm.
@ ED_PGK_KEY_LENGTH
PgpKeyInfo.keylen.
@ ED_PGK_PKEY_FLAGS
pgp_principal_key(), PgpKeyInfo.kflags, pgp_flags()
int(* sort_t)(const void *a, const void *b, void *sdata)
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
#define SORT_MASK
Mask for the sort id.
@ SORT_TRUST
Sort by encryption key's trust level.
@ SORT_KEYID
Sort by the encryption key's ID.
@ SORT_DATE
Sort by the date the email was sent.
@ SORT_ADDRESS
Sort by email address.
#define SORT_REVERSE
Reverse the order of the sort.
Assorted sorting methods.
#define mutt_numeric_cmp(a, b)
struct Buffer * mailbox
Mailbox and host address.
String manipulation buffer.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
const char * name
Name of config item that changed.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
const char * text
Node-specific text.
Mapping between user-readable string and a constant.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
locale_t time_c_locale
Current locale but LC_TIME=C.
Data passed to a notification function.
void * event_data
Data from notify_send()
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()
Data to pass to the Pgp Functions.
struct Menu * menu
Pgp Menu.
bool done
Should we close the Dialog?
struct PgpUidArray * key_table
Array of Keys.
struct PgpKeyInfo * key
Selected Key.
An entry in a PGP key menu.
struct PgpUid * uid
PGP Key info.
Information about a PGP key.
struct PgpKeyInfo * parent
Parent key.
struct PgpUid * next
Linked list.
Tuple for the results of simple_dialog_new()
struct MuttWindow * sbar
Simple Bar.
struct MuttWindow * dlg
Main Dialog Window.
@ MENU_PGP
PGP encryption menu.