gpg_error_t
result_add_timestamp (struct result_xml_state *state, char *name,
unsigned int timestamp)
-{
- char code[20];
+{
+ code[20];
snprintf (code, sizeof (code) - 1, "%ui", timestamp);
result_xml_tag_start (state, name, "unix", code, NULL);
while (inv_recp)
{
result_xml_tag_start (&state, "invalid-key", NULL);
- result_add_fpr (&state, "fpr", inv_recp->fpr);
+ if (inv_recp->fpr)
+ result_add_fpr (&state, "fpr", inv_recp->fpr);
result_add_error (&state, "reason", inv_recp->reason);
result_xml_tag_end (&state);
inv_recp = inv_recp->next;
while (inv_key)
{
result_xml_tag_start (&state, "invalid-key", NULL);
- result_add_fpr (&state, "fpr", inv_key->fpr);
+ if (inv_key->fpr)
+ result_add_fpr (&state, "fpr", inv_key->fpr);
result_add_error (&state, "reason", inv_key->reason);
result_xml_tag_end (&state);
inv_key = inv_key->next;
/* FIXME: Could be done better. */
result_add_value (&state, "summary", sig->summary);
- result_add_fpr (&state, "fpr", sig->fpr);
+ if (sig->fpr)
+ result_add_fpr (&state, "fpr", sig->fpr);
result_add_error (&state, "status", sig->status);
/* FIXME: notations */
result_add_timestamp (&state, "timestamp", sig->timestamp);
{
result_xml_tag_start (&state, "import-status", NULL);
- result_add_fpr (&state, "fpr", stat->fpr);
+ if (stat->fpr)
+ result_add_fpr (&state, "fpr", stat->fpr);
result_add_error (&state, "result", stat->result);
/* FIXME: Could be done better. */
result_add_value (&state, "status", stat->status);
result_add_value (&state, "primary", res->primary);
result_add_value (&state, "sub", res->sub);
- result_add_fpr (&state, "fpr", res->fpr);
+ if (res->fpr)
+ result_add_fpr (&state, "fpr", res->fpr);
result_xml_tag_end (&state);