mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
g10: Use the time a signature was seen, not the embedded time, for stats
* g10/tofu.c (ask_about_binding): Use the time that a signature was seen, not allegedly generated, when generating statistics. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
a937eef2d4
commit
bde29a46ce
@ -1397,9 +1397,6 @@ ask_about_binding (ctrl_t ctrl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the stats for all the keys in CONFLICT_SET. */
|
/* Get the stats for all the keys in CONFLICT_SET. */
|
||||||
/* FIXME: When generating the statistics, do we want the time
|
|
||||||
embedded in the signature (column 'sig_time') or the time that
|
|
||||||
we first verified the signature (column 'time'). */
|
|
||||||
strlist_rev (&conflict_set);
|
strlist_rev (&conflict_set);
|
||||||
for (iter = conflict_set; iter && ! rc; iter = iter->next)
|
for (iter = conflict_set; iter && ! rc; iter = iter->next)
|
||||||
{
|
{
|
||||||
@ -1435,10 +1432,12 @@ ask_about_binding (ctrl_t ctrl,
|
|||||||
/* Make sure the current key is first. */ \
|
/* Make sure the current key is first. */ \
|
||||||
" order by time_ago desc;\n"
|
" order by time_ago desc;\n"
|
||||||
|
|
||||||
|
/* Use the time when we saw the signature, not when the
|
||||||
|
signature was created as that can be forged. */
|
||||||
rc = gpgsql_stepx
|
rc = gpgsql_stepx
|
||||||
(dbs->db, &dbs->s.get_trust_gather_signature_stats,
|
(dbs->db, &dbs->s.get_trust_gather_signature_stats,
|
||||||
signature_stats_collect_cb, &stats, &sqerr,
|
signature_stats_collect_cb, &stats, &sqerr,
|
||||||
STATS_SQL ("signatures", "sig_time", ""),
|
STATS_SQL ("signatures", "time", ""),
|
||||||
GPGSQL_ARG_LONG_LONG, (long long) now,
|
GPGSQL_ARG_LONG_LONG, (long long) now,
|
||||||
GPGSQL_ARG_STRING, email,
|
GPGSQL_ARG_STRING, email,
|
||||||
GPGSQL_ARG_STRING, iter->d,
|
GPGSQL_ARG_STRING, iter->d,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user