python-tuf/tuf
Joshua Lock 4bcd703462 client: update expiration check to match spec
The specification, as of 1.0.16, describes an update expiration check as:

> The expiration timestamp in the trusted $ROLE metadata file MUST be
  higher than the fixed update expiration time.

Having done some research into how other security providers are comparing
expiration equivalents (i.e. OpenSSL x509 certificate checking code, and
GnuPG expiration checks), and how other TUF implementations are performing
the same check (rust-tuf, go-tuf), we came to a consensus that the correct
way to implement expiration comparisons is:

    expiration <= now

Where:
  expiration: is the metadata's expiration datetime
  now: is the current system time, or the fixed notion of time in the
       detailed client workflow (introduced in 1.0.16 of the spec)

Fixes #1231

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-12-08 14:05:44 +00:00
..
api Add root metadata class 2020-11-09 11:37:55 +02:00
client client: update expiration check to match spec 2020-12-08 14:05:44 +00:00
scripts Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
__init__.py Prepare 0.16.0 release 2020-11-26 13:15:14 +00:00
ATTACKS.md fix-up the document spelling mistake 2019-08-27 14:41:24 +08:00
developer_tool.py Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
download.py Merge pull request #1145 from jku/silence-errors-to-be-raised 2020-09-22 13:42:27 +01:00
exceptions.py Add MissingLocalRepositoryError 2020-10-12 15:23:15 +03:00
formats.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
keydb.py Remove uses of keyid_hash_algorithms 2020-09-09 10:51:46 +01:00
log.py log: Close the file handler when it's removed 2020-08-10 16:11:33 +03:00
mirrors.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
README-developer-tools.md Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
README.md Link to CLI.md from getting started and readme docs 2018-02-06 17:00:24 -05:00
repository_lib.py Make metadata signatures ordered by keyid 2020-11-19 17:42:27 +01:00
repository_tool.py Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
roledb.py Add TOP_LEVEL_ROLES as a global variable 2020-06-29 13:55:45 +03:00
settings.py Port to new securesystemslib w abstract filesystem 2020-05-12 22:16:50 +01:00
sig.py sig: Remove iso8601 logger mentions 2020-10-13 12:11:37 +03:00
unittest_toolbox.py Rename license files in modules 2018-02-05 11:31:19 -05:00