mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-08 06:31:50 +00:00
The system clock may be terribly off, especially on new hardware that has not yet been calibrated. Updates rely on the certificate and system time being sane to verify validity, so if a mismatch is found the certificate will be deemed invalid and the update stopped. This patch attempts to fix the system time to something sane using the time from the swupd binary itself, which should not have been touched by any user except root. If the time is normal and verification fails, the cert cannot be trusted. Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>