python-tuf/tests
vladdd 1e360846bf Reject expired metadata without loading.
Reject downloaded metadata as early as possible.  The top-level roles were all downloaded as a group and then their
expiration inspected.  All metadata provided by a mirror that has already expired is discarded immediately and the next mirror tried.  The update process stops if a requested role cannot be successfully validated, or one of its parents.

[2014-04-29 02:00:32,308 UTC] [tuf.download] [INFO] [_download_file:745@download.py]
Downloading: http://localhost:8001/metadata/timestamp.json

[2014-04-29 02:00:32,324 UTC] [tuf.download] [INFO] [_check_downloaded_length:676@download.py]
Downloaded 544 bytes out of an upper limit of 16384 bytes.

[2014-04-29 02:00:32,324 UTC] [tuf.client.updater] [INFO] [_get_file:1189@updater.py]
Not decompressing http://localhost:8001/metadata/timestamp.json

[2014-04-29 02:00:32,331 UTC] [tuf.download] [INFO] [_download_file:745@download.py]
Downloading: http://localhost:8001/metadata/snapshot.json

[2014-04-29 02:00:32,333 UTC] [tuf.download] [INFO] [_check_downloaded_length:654@download.py]
Downloaded 1003 bytes out of the expected 1003 bytes.

[2014-04-29 02:00:32,334 UTC] [tuf.client.updater] [INFO] [_get_file:1189@updater.py]
Not decompressing http://localhost:8001/metadata/snapshot.json

[2014-04-29 02:00:32,334 UTC] [tuf.client.updater] [INFO] [_check_hashes:696@updater.py]
The file's sha256 hash is correct: 5b3aec7cf295a25e4b39d875c7474511da9645bc6d27f9e86fb7e439c82e0ec7

[2014-04-29 02:00:32,335 UTC] [tuf.client.updater] [ERROR] [_ensure_not_expired:1789@updater.py]
Metadata 'snapshot' expired on Tue Apr 29 01:59:01 2014 (UTC).

Do not request, download, and install top-level roles if the root of trust has already expired after the inital load. If requested, update an expired root role:

[2014-04-29 01:18:02,457 UTC] [tuf.client.updater] [ERROR] [_ensure_not_expired:1789@updater.py]
Metadata 'root' expired on Mon Apr 28 23:23:57 2014 (UTC).

[2014-04-29 01:18:02,458 UTC] [tuf.client.updater] [INFO] [refresh:628@updater.py]
Expired Root metadata was loaded from disk.  Try to update it now.

[2014-04-29 01:18:02,458 UTC] [tuf.download] [INFO] [_download_file:745@download.py]
Downloading: http://localhost:8001/metadata/root.json

[2014-04-29 01:18:02,461 UTC] [tuf.download] [INFO] [_check_downloaded_length:676@download.py]
Downloaded 1198 bytes out of an upper limit of 512000 bytes.

[2014-04-29 01:18:02,461 UTC] [tuf.client.updater] [INFO] [_get_file:1189@updater.py]
Not decompressing http://localhost:8001/metadata/root.json

[2014-04-29 01:18:02,462 UTC] [tuf.client.updater] [ERROR] [_ensure_not_expired:1789@updater.py]
Metadata 'root' expired on Mon Apr 28 23:23:57 2014 (UTC).

Note: An expired 'root' was provided by the server.  The requested root must also be signed by keys trusted by the client.
2014-04-28 22:31:42 -04:00
..
repository_data Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
.coveragerc Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
__init__.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
aggregate_tests.py Edit aggregate_tests.py comment. 2014-04-20 16:19:56 -04:00
simple_server.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
slow_retrieval_server.py Update slow retrieval server and attack. 2014-04-21 05:34:16 -04:00
test_arbitrary_package_attack.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_download.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_ed25519_keys.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
test_endless_data_attack.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_extraneous_dependencies_attack.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_formats.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
test_hash.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_indefinite_freeze_attack.py Reject expired metadata without loading. 2014-04-28 22:31:42 -04:00
test_keydb.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
test_keys.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_mirrors.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_mix_and_match_attack.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_pycrypto_keys.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
test_replay_attack.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_repository_tool.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
test_roledb.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
test_schema.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
test_sig.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
test_slow_retrieval_attack.py Update slow retrieval server and attack. 2014-04-21 05:34:16 -04:00
test_updater.py Reject expired metadata without loading. 2014-04-28 22:31:42 -04:00
test_util.py Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00