120 case GPGME_VALIDITY_FULL:
123 case GPGME_VALIDITY_MARGINAL:
126 case GPGME_VALIDITY_NEVER:
129 case GPGME_VALIDITY_ULTIMATE:
132 case GPGME_VALIDITY_UNDEFINED:
135 case GPGME_VALIDITY_UNKNOWN:
154 const char *s = key->
uid;
167 const char *s = NULL;
168 if (key->
kobj->subkeys)
169 s = gpgme_pubkey_algo_name(key->
kobj->subkeys->pubkey_algo);
198 const char *text = node->
text;
199 bool use_c_locale =
false;
206 struct tm tm = { 0 };
207 if (key->
kobj->subkeys && (key->
kobj->subkeys->timestamp > 0))
216 char tmp[128] = { 0 };
223 strftime(tmp,
sizeof(tmp), text, &tm);
236 return key->
kobj->subkeys->timestamp;
290 return key->
kobj->subkeys ? key->
kobj->subkeys->length : 0;
302 const char *s = gpgme_get_protocol_name(key->
kobj->protocol);
331 { -1, -1, NULL, NULL },
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Convenience wrapper for the core headers.
const char * crypt_fpr_or_lkeyid(struct CryptKeyInfo *k)
Find the fingerprint of a key.
const char * crypt_keyid(struct CryptKeyInfo *k)
Find the ID for the key.
Wrapper for PGP/SMIME calls to GPGME.
@ ED_PGP
Pgp ED_PGP_ ExpandoDataPgp.
@ ED_PGP_KEY
Pgp_Key ED_PGK_ ExpandoDataPgpKey.
static char * crypt_key_abilities(KeyFlags flags)
Parse key flags into a string.
const struct ExpandoRenderCallback PgpEntryGpgmeRenderCallbacks[]
Callbacks for GPGME Key Expandos.
static char * crypt_flags(KeyFlags flags)
Parse the key flags into a single character.
Ncrypt GPGME Expando definitions.
static long gpgme_key_length_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
GPGME: Key length - Implements get_number_t -.
static long gpgme_entry_number_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
GPGME: Index number - Implements get_number_t -.
static long gpgme_key_date_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
GPGME: Date of the key - Implements get_number_t -.
static void gpgme_key_flags(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Key Flags - Implements get_string_t -.
static void gpgme_key_protocol(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Protocol - Implements get_string_t -.
static void gpgme_entry_trust(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Trust/validity - Implements get_string_t -.
static void gpgme_key_capabilities(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Key Capabilities - Implements get_string_t -.
static void gpgme_key_algorithm(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Key Algorithm - Implements get_string_t -.
static void gpgme_key_date(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Date of the key - Implements get_string_t -.
static void gpgme_key_fingerprint(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Key fingerprint - Implements get_string_t -.
static void gpgme_entry_user_id(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: User id - Implements get_string_t -.
static void gpgme_key_id(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
GPGME: Key id - Implements get_string_t -.
struct tm mutt_date_localtime(time_t t)
Converts calendar time to a broken-down time structure expressed in user timezone.
Convenience wrapper for the library headers.
#define KEYFLAG_EXPIRED
Key is expired.
#define KEYFLAG_ISX509
Key is an X.509 key.
uint16_t KeyFlags
Flags describing PGP/SMIME keys, e.g. KEYFLAG_CANSIGN.
#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.
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()
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
String manipulation buffer.
An entry in the Select-Key menu.
struct CryptKeyInfo * key
Key.
gpgme_validity_t validity
uid validity (cached for convenience)
KeyFlags flags
global and per uid flags (for convenience)
const char * uid
and for convenience point to this user ID
const char * text
Node-specific text.
Container for Accounts, Notifications.
locale_t time_c_locale
Current locale but LC_TIME=C.