diff options
author | Werner Koch <[email protected]> | 2019-08-23 13:58:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-08-23 13:58:27 +0000 |
commit | e854580fa562c423f3d977318b515fb4d186f99a (patch) | |
tree | 61087c23e92d7cf852ce82841d723972aa02a16c | |
parent | gpg: Allow --locate-external-key even with --no-auto-key-locate. (diff) | |
download | gnupg-e854580fa562c423f3d977318b515fb4d186f99a.tar.gz gnupg-e854580fa562c423f3d977318b515fb4d186f99a.zip |
kbx: Allow "gpgsm --faked-system-time" to kick off a compression run.
* kbx/keybox-update.c (keybox_compress): Use make_timestamp.
--
We have implemented the same in master, albeit we needed two commits
for that.
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | kbx/keybox-update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kbx/keybox-update.c b/kbx/keybox-update.c index e09fefc41..e25596b26 100644 --- a/kbx/keybox-update.c +++ b/kbx/keybox-update.c @@ -675,7 +675,7 @@ keybox_compress (KEYBOX_HANDLE hd) { u32 last_maint = buf32_to_u32 (buffer+20); - if ( (last_maint + 3*3600) > time (NULL) ) + if ( (last_maint + 3*3600) > make_timestamp () ) { fclose (fp); _keybox_release_blob (blob); @@ -700,7 +700,7 @@ keybox_compress (KEYBOX_HANDLE hd) automagically skip any blobs flagged as deleted. Thus what we only have to do is to check all ephemeral flagged blocks whether their time has come and write out all other blobs. */ - cut_time = time(NULL) - 86400; + cut_time = make_timestamp () - 86400; first_blob = 1; skipped_deleted = 0; for (rc=0; !(read_rc = _keybox_read_blob (&blob, fp, &skipped_deleted)); |