Browse Source

Only list usable public keys.

When building the list of public keys, exclude keys that cannot
be used for encryption for any reason.
master
Damien Goutte-Gattat 2 years ago
parent
commit
26b6f3c51e
  1. 4
      src/yki.c

4
src/yki.c

@ -68,6 +68,10 @@ populate_public_key_list(yorkie_ctx_t *yki)
while ( ! gerr ) {
gerr = gpgme_op_keylist_next(yki->gpgme, &key);
if ( ! gerr ) {
if ( key->revoked || key->expired || key->disabled || key->invalid || ! key->can_encrypt )
continue;
gtk_list_store_append(yki->public_keys, &iter);
gtk_list_store_set(yki->public_keys, &iter,
0, FALSE,

Loading…
Cancel
Save