gpgme-tool: Print fingerprint and keyid with keyservers.
authorWerner Koch <wk@gnupg.org>
Tue, 12 Aug 2014 08:36:30 +0000 (10:36 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 12 Aug 2014 16:50:14 +0000 (18:50 +0200)
* src/gpgme-tool.c (cmd_keylist): Print keyid.  Print FPR only if
available.

src/gpgme-tool.c

index e1fd983..d42179b 100644 (file)
@@ -3305,7 +3305,9 @@ cmd_keylist (assuan_context_t ctx, char *line)
          while (subkey) {
            result_xml_tag_start (&state, "subkey", NULL);
            /* FIXME: more data */
          while (subkey) {
            result_xml_tag_start (&state, "subkey", NULL);
            /* FIXME: more data */
-           result_add_fpr (&state, "fpr", subkey->fpr);
+           result_add_keyid (&state, "keyid", subkey->keyid);
+            if (subkey->fpr)
+              result_add_fpr (&state, "fpr", subkey->fpr);
             result_add_value (&state, "secret", subkey->secret);
             result_add_value (&state, "is_cardkey", subkey->is_cardkey);
             if (subkey->card_number)
             result_add_value (&state, "secret", subkey->secret);
             result_add_value (&state, "is_cardkey", subkey->is_cardkey);
             if (subkey->card_number)