From 422a4021e482c51d4f21303dfd4eff4c15ba1114 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 13 Nov 2012 16:49:01 +1000 Subject: Fix future signature timestamp warning The warning given for a signature timstamp being in the future compared to the system time stated the opposite. Also, move this warning to debug output. It is useless in its current form as the package or database that is giving the error is not mentioned and so other debug output is needed to find the offending signature. Signed-off-by: Allan McRae --- lib/libalpm/signing.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/libalpm/signing.c') diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index 6eb2da58..9180cc97 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -525,16 +525,17 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path, alpm_list_free(summary_list); _alpm_log(handle, ALPM_LOG_DEBUG, "status: %s\n", gpgme_strerror(gpgsig->status)); _alpm_log(handle, ALPM_LOG_DEBUG, "timestamp: %lu\n", gpgsig->timestamp); + + if((time_t)gpgsig->timestamp > time(NULL)) { + _alpm_log(handle, ALPM_LOG_DEBUG, + "signature timestamp is greater than system time.\n"); + } + _alpm_log(handle, ALPM_LOG_DEBUG, "exp_timestamp: %lu\n", gpgsig->exp_timestamp); _alpm_log(handle, ALPM_LOG_DEBUG, "validity: %s; reason: %s\n", string_validity(gpgsig->validity), gpgme_strerror(gpgsig->validity_reason)); - if((time_t)gpgsig->timestamp > time(NULL)) { - _alpm_log(handle, ALPM_LOG_WARNING, - _("System time is greater than signature timestamp.\n")); - } - result = siglist->results + sigcount; err = gpgme_get_key(ctx, gpgsig->fpr, &key, 0); if(gpg_err_code(err) == GPG_ERR_EOF) { -- cgit v1.2.3-24-g4f1b