Added signature verification, /pgp fps command
This commit is contained in:
@@ -1579,6 +1579,7 @@ cmd_init(void)
|
||||
|
||||
pgp_ac = autocomplete_new();
|
||||
autocomplete_add(pgp_ac, "keys");
|
||||
autocomplete_add(pgp_ac, "fps");
|
||||
autocomplete_add(pgp_ac, "libver");
|
||||
}
|
||||
|
||||
|
||||
@@ -4093,6 +4093,22 @@ cmd_pgp(gchar **args, struct cmd_help_t help)
|
||||
cons_show("No keys found");
|
||||
}
|
||||
g_slist_free_full(keys, (GDestroyNotify)p_gpg_free_key);
|
||||
} else if (g_strcmp0(args[0], "fps") == 0) {
|
||||
GHashTable *fingerprints = p_gpg_fingerprints();
|
||||
GList *jids = g_hash_table_get_keys(fingerprints);
|
||||
if (jids) {
|
||||
cons_show("Received PGP fingerprints:");
|
||||
GList *curr = jids;
|
||||
while (curr) {
|
||||
char *jid = curr->data;
|
||||
char *fingerprint = g_hash_table_lookup(fingerprints, jid);
|
||||
cons_show(" %s: %s", jid, fingerprint);
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
} else {
|
||||
cons_show("No PGP fingerprints received.");
|
||||
}
|
||||
g_list_free(jids);
|
||||
} else if (g_strcmp0(args[0], "libver") == 0) {
|
||||
const char *libver = p_gpg_libver();
|
||||
if (libver) {
|
||||
|
||||
Reference in New Issue
Block a user