Changeset View
Changeset View
Standalone View
Standalone View
src/keylist.c
Show First 20 Lines • Show All 410 Lines • ▼ Show 20 Lines | else | ||||
{ | { | ||||
/* RFU. */ | /* RFU. */ | ||||
} | } | ||||
return 0; | return 0; | ||||
} | } | ||||
/* Parse the compliance field. */ | |||||
static void | |||||
parse_pub_field18 (gpgme_subkey_t subkey, char *field) | |||||
{ | |||||
char *p, *endp; | |||||
unsigned long ul; | |||||
for (p = field; p && (ul = strtoul (p, &endp, 10)) && p != endp; p = endp) | |||||
{ | |||||
switch (ul) | |||||
{ | |||||
case 23: subkey->is_de_vs = 1; break; | |||||
} | |||||
} | |||||
} | |||||
/* Parse a tfs record. */ | /* Parse a tfs record. */ | ||||
static gpg_error_t | static gpg_error_t | ||||
parse_tfs_record (gpgme_user_id_t uid, char **field, int nfield) | parse_tfs_record (gpgme_user_id_t uid, char **field, int nfield) | ||||
{ | { | ||||
gpg_error_t err; | gpg_error_t err; | ||||
gpgme_tofu_info_t ti; | gpgme_tofu_info_t ti; | ||||
unsigned long uval; | unsigned long uval; | ||||
▲ Show 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | set_mainkey_capability (key, field[11]); | ||||
{ | { | ||||
subkey->curve = strdup (field[16]); | subkey->curve = strdup (field[16]); | ||||
if (!subkey->curve) | if (!subkey->curve) | ||||
return gpg_error_from_syserror (); | return gpg_error_from_syserror (); | ||||
} | } | ||||
/* Field 18 has the compliance flags. */ | /* Field 18 has the compliance flags. */ | ||||
if (fields >= 17 && *field[17]) | if (fields >= 17 && *field[17]) | ||||
parse_pub_field18 (subkey, field[17]); | PARSE_COMPLIANCE_FLAGS (field[17], subkey); | ||||
if (fields >= 20) | if (fields >= 20) | ||||
{ | { | ||||
key->last_update = _gpgme_parse_timestamp_ul (field[18]); | key->last_update = _gpgme_parse_timestamp_ul (field[18]); | ||||
key->origin = 0; /* Fixme: Not yet defined in gpg. */ | key->origin = 0; /* Fixme: Not yet defined in gpg. */ | ||||
} | } | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | set_subkey_capability (subkey, field[11]); | ||||
{ | { | ||||
subkey->curve = strdup (field[16]); | subkey->curve = strdup (field[16]); | ||||
if (!subkey->curve) | if (!subkey->curve) | ||||
return gpg_error_from_syserror (); | return gpg_error_from_syserror (); | ||||
} | } | ||||
/* Field 18 has the compliance flags. */ | /* Field 18 has the compliance flags. */ | ||||
if (fields >= 17 && *field[17]) | if (fields >= 17 && *field[17]) | ||||
parse_pub_field18 (subkey, field[17]); | PARSE_COMPLIANCE_FLAGS (field[17], subkey); | ||||
break; | break; | ||||
case RT_UID: | case RT_UID: | ||||
/* Field 2 has the trust info, and field 10 has the user ID. */ | /* Field 2 has the trust info, and field 10 has the user ID. */ | ||||
if (fields >= 10) | if (fields >= 10) | ||||
{ | { | ||||
if (_gpgme_key_append_name (key, field[9], 1)) | if (_gpgme_key_append_name (key, field[9], 1)) | ||||
▲ Show 20 Lines • Show All 510 Lines • Show Last 20 Lines |