mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-11 22:01:08 +02:00
gpg: Fix the TOFU_STATS_LONG status.
* g10/tofu.c (show_statistics): Print TOFU STATS with formatting characters. -- We better leave the non-breaking space character in the status messages so that the caller can make use of them. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
437c97ab6a
commit
fd973ee1c1
@ -688,7 +688,7 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB:
|
|||||||
|
|
||||||
This status identifies the key and the userid for all following
|
This status identifies the key and the userid for all following
|
||||||
Tofu information. The fingerprint is the fingerprint of the
|
Tofu information. The fingerprint is the fingerprint of the
|
||||||
primary key and the mbox is in general the mailbox part of the
|
primary key and the mbox is in general the addr-spec part of the
|
||||||
userid encoded in UTF-8 and percent escaped.
|
userid encoded in UTF-8 and percent escaped.
|
||||||
|
|
||||||
*** TOFU_STATS <validity> <sign-count> 0 [<policy> [<tm1> <tm2>]]
|
*** TOFU_STATS <validity> <sign-count> 0 [<policy> [<tm1> <tm2>]]
|
||||||
@ -730,8 +730,8 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB:
|
|||||||
*** PKA_TRUST_
|
*** PKA_TRUST_
|
||||||
This is is one:
|
This is is one:
|
||||||
|
|
||||||
- PKA_TRUST_GOOD <mailbox>
|
- PKA_TRUST_GOOD <addr-spec>
|
||||||
- PKA_TRUST_BAD <mailbox>
|
- PKA_TRUST_BAD <addr-spec>
|
||||||
|
|
||||||
Depending on the outcome of the PKA check one of the above status
|
Depending on the outcome of the PKA check one of the above status
|
||||||
codes is emitted in addition to a =TRUST_*= status.
|
codes is emitted in addition to a =TRUST_*= status.
|
||||||
|
11
g10/tofu.c
11
g10/tofu.c
@ -2101,7 +2101,7 @@ get_trust (struct dbs *dbs, const char *fingerprint, const char *email,
|
|||||||
/* TRANSLATORS: Please translate the text found in the source
|
/* TRANSLATORS: Please translate the text found in the source
|
||||||
file below. We don't directly internationalize that text
|
file below. We don't directly internationalize that text
|
||||||
so that we can tweak it without breaking translations. */
|
so that we can tweak it without breaking translations. */
|
||||||
const char *text = _("TOFU detected a binding conflict");
|
char *text = _("TOFU detected a binding conflict");
|
||||||
char *textbuf;
|
char *textbuf;
|
||||||
if (strcmp (text, "TOFU detected a binding conflict") == 0)
|
if (strcmp (text, "TOFU detected a binding conflict") == 0)
|
||||||
/* No translation. Use the English text. */
|
/* No translation. Use the English text. */
|
||||||
@ -2542,15 +2542,18 @@ show_statistics (struct dbs *dbs, const char *fingerprint,
|
|||||||
log_fatal ("error snatching memory stream\n");
|
log_fatal ("error snatching memory stream\n");
|
||||||
msg = format_text (tmpmsg, 0, 72, 80);
|
msg = format_text (tmpmsg, 0, 72, 80);
|
||||||
es_free (tmpmsg);
|
es_free (tmpmsg);
|
||||||
for (p=msg; *p; p++)
|
|
||||||
if (*p == '~')
|
|
||||||
*p = ' ';
|
|
||||||
|
|
||||||
/* Print a status line but suppress the trailing LF.
|
/* Print a status line but suppress the trailing LF.
|
||||||
* Spaces are not percent escaped. */
|
* Spaces are not percent escaped. */
|
||||||
if (*msg)
|
if (*msg)
|
||||||
write_status_buffer (STATUS_TOFU_STATS_LONG,
|
write_status_buffer (STATUS_TOFU_STATS_LONG,
|
||||||
msg, strlen (msg)-1, -1);
|
msg, strlen (msg)-1, -1);
|
||||||
|
|
||||||
|
/* Remove the non-breaking space markers. */
|
||||||
|
for (p=msg; *p; p++)
|
||||||
|
if (*p == '~')
|
||||||
|
*p = ' ';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log_string (GPGRT_LOG_INFO, msg);
|
log_string (GPGRT_LOG_INFO, msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user