Commit graph

73 commits

Author SHA1 Message Date
Sebastien Awwad
847f20df9e
Update version to 0.11.2.dev3
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2019-01-10 11:52:42 -05:00
Sebastien Awwad
23cfcbe783
Bump version to 0.11.2.dev2 from 0.11.2.dev1
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-11-05 15:57:05 -05:00
Sebastien Awwad
73f3289942
Bump version to 0.11.2.dev1 for PyPI dev release
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-10-03 11:59:56 -04:00
Sebastien Awwad
24a10b5527
Update dependencies and bump version to 0.11.2-alpha
for an alpha release.

Update dependencies:
bandit, py, pycparser, pynacl, securesystemslib, tox

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-10-02 22:24:14 -04:00
Sebastien Awwad
314f6e71b9
Remove partial single-source version; add comments explaining
Previous commit isn't going to work: read wasn't defined. Code
provided was from here:
https://packaging.python.org/guides/single-sourcing-package-version/

and is a little more complicated than is ideal. It'll also match
comment lines if they exist. Single-sourcing version number isn't
necessary for this pull request, but if I was going to do it, I'd
probably add a VERSION file and have tuf/__init__.py and setup.py
each read that in. There could be problems with that, too. I'm
going to punt on this and keep the version in two places and we
can fix that less urgently. (Also, the user agent reporting a
version seems less critical in any case than the rest of the PR.)

Version info will now be in two locations and require update in
tandem.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-10 16:29:59 -04:00
Trishank K Kuppusamy
34e0ec7c62
Add TUF version number, and user agent
Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-10 16:29:48 -04:00
Vladimir Diaz
47c531f5f0
Remove obsolete settings code from __init__.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-30 11:13:28 -05:00
Artiom Baloian
b793c81739 Added simple_settings, now it is a requirement of TuF.
Rename conf.py into the settings.py an changed import call.
2016-11-01 15:38:40 -04:00
Artiom Baloian
8247a02737 Moved TuF exceptions and schem into the ssl_commons 2016-10-31 11:58:05 -04:00
Artiom Baloian
7098cdbc3a Move _vendor dir and split formats into the formats and tufformats 2016-10-28 18:37:28 -04:00
Vladimir Diaz
07b4b24343 Finish edits to repository tool doc and update code to fix issues with slow retrieval errors 2016-10-21 11:36:48 -04:00
Vladimir Diaz
70fc8dce36 Resolve merge conflicts with upstream and ecordell-root-versioning 2016-10-18 10:28:04 -04:00
Vladimir Diaz
8882dc5b7b Merge branch 'root-versioning' of https://github.com/ecordell/tuf into ecordell-root-versioning
Conflicts:
	tests/test_key_revocation.py
	tests/test_replay_attack.py
	tests/test_repository_tool.py
	tests/test_updater.py
	tuf/formats.py
	tuf/repository_lib.py
2016-10-17 15:57:48 -04:00
Vladimir Diaz
b03deee874 Modify the way slow retrieval errors are raised and detected.
Potential slow retrieval errors are raised for safe downloads (strict check on file size) and not for unsafe (a file size less than an upper limit).  Slow retrieval errors should always be prevented
2016-10-10 17:34:00 -04:00
Sebastien Awwad
7cd20fe035
Fixing another bug in tuf/__init__() and making the intended logging there happen. 2016-03-16 16:45:58 -04:00
Sebastien Awwad
c4ef697ec8
Fix for newly discovered python 3 issue causing unprintable exceptions 2016-03-16 16:39:47 -04:00
Vladimir Diaz
2f77fbccb6 Merge branch 'develop' of github.com:theupdateframework/tuf into tuf1.0_version_numbers 2016-01-27 17:07:06 -05:00
David Halls
1c51b8d732 Don't import tuf.log in __init__.py so importing tuf.conf doesn't start logging 2016-01-19 07:12:07 +00:00
Vladimir Diaz
af6f5c9d83 Review __init__.py 2015-10-27 17:00:56 -04:00
Vladimir Diaz
ed1f217022 Implement changes for _update_metadata() 2015-10-15 09:49:32 -04:00
Vladimir Diaz
1c8f41b0c0 Update import statements of unvendored dependencies 2015-06-02 08:29:22 -04:00
Vladimir Diaz
6be5ce8c08 Edit the docstrings of the interposition Exceptions
Modified the docstrings of interposition's Exception classes to be less specific.
2015-01-28 15:28:00 -05:00
Pankhuri Goyal
56b942a341 Changes in the error name in tuf.__init__ 2014-08-01 13:46:26 -04:00
Pankhuri Goyal
03164345e6 Add an InvalidConfiguration exception class in tuf.__init__ 2014-07-31 18:14:48 -04:00
Pankhuri Goyal
572e0c6079 Add interposition exception error classes in tuf.__init__ 2014-07-30 15:31:35 -04:00
Vladimir Diaz
091cfe9aeb Increase sleep time after starting simple server in affected tests. 2014-06-06 07:32:03 -04:00
vladdd
6b8b2399a2 Finish unit tests for Python2 + 3 support.
All unit tests updated / running for Python 2 + 3.
TODO: Fix non-Python 3 issue with util.py.
2014-05-27 13:55:48 -04:00
vladdd
e4bd9a7ba2 [WIP] Refactor download.py 2014-05-11 22:59:42 -04:00
Vladimir Diaz
8684253675 [WIP] Python 2+3.
Mostly unicode-related changes for crypto modules.
2014-05-06 15:24:39 -04:00
Vladimir Diaz
ab95a4b3aa [WIP] Python 2+3 support.
Python 2+3 unicode.
libraries.
The following modules (and their tests) work in PY2.7+3.3:
keydb, hash, formats, mirrors
2014-04-29 14:27:34 -04:00
Vladimir Diaz
e23b4e5eae Merge branch 'develop' of https://github.com/theupdateframework/tuf into develop
Conflicts:
	tuf/__init__.py
	tuf/client/updater.py
2014-04-29 08:31:29 -04:00
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
Vladimir Diaz
a7f28b9af4 [WIP] Python 2+3 support.
Add six, convert PY <=2.5 exception handling, dictionary iteration, libraries, 1/2 the tests.
2014-04-22 15:03:42 -04:00
vladdd
08a2bad2c0 Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
Vladimir Diaz
919fb0ff8f Log warning if top-level metadata expires soon. 2014-04-17 12:27:28 -04:00
Vladimir Diaz
1935b1de2b Update TUF modules affected by the change to the 'expires' format. 2014-04-15 12:52:35 -04:00
Vladimir Diaz
45c65c9178 Merge branch 'develop' into repository-tools 2013-12-16 14:22:31 -05:00
dachshund
ed4fe44530 Fix #150. 2013-11-28 11:22:50 -05:00
PandaSPUR
17924213fd Update SlowRetrievalError
Updating on behalf of "Red Team" of App. Sec.
Undescriptive error found while testing gemsontuf.
2013-11-27 15:30:41 -05:00
Vladimir Diaz
e437dbaf14 Update comments & docstrings, fix bug, and address issues #135 and #138
Issue #135: Duplicate signatures, rather than keys, was previously saved to metadata.  libtuf.py should now store one signature per keyid.  It should be noted that these duplicates were not identical, as PSS incorporates random salts and able to generate two valid signatures (and not equal) with the same key.

Issue #138: The write_partial() method added to libtuf.Repository.

Fixed a bug in load_repository() that did not properly detect some compressed delegated roles and failed to update the 'compressions' field of the Targets object.
2013-11-22 11:13:11 -05:00
vladdd
01deddfd18 Initial implementation of the repository tools.
Delegations and repository loading now implemented.  Updates to comments, docstrings, and a unit test needed.
2013-11-12 15:00:26 -05:00
vladdd
7ae7f2ddc2 Add new tuf.formats.py schema for pycrypto_keys.py
Remove extra whitespace in __init__.py
2013-10-17 12:54:08 -04:00
vladdd
7d691011e5 Resolve conflicts from demo 2 updates 2013-09-23 13:38:18 -04:00
dachshund
d7899e536b Fix typo. 2013-09-18 03:18:51 -04:00
dachshund
85125c4a4f Better error formatting. 2013-09-18 03:12:39 -04:00
dachshund
a0f437b2e4 Better string representation of NoWorkingMirrorError. 2013-09-17 23:36:48 -04:00
dachshund
8187be5232 Simplify exception text in console handler. 2013-09-13 23:47:37 -04:00
dachshund
26551b95c9 Fix #102. 2013-09-11 17:46:29 -04:00
dachshund
f026a998a9 Fix #102. 2013-09-11 17:46:29 -04:00
dachshund
9ddd2617f5 Redundantly verify file length in updater.
You may argue that the redundancy is unnecessary (pun intended), but it
is there because redundancy means one safety check will work where
another fails. I introduced this redundant file length check because the
updater unit test is mocking the download functions, which means that
file length checks in the download functions are being bypassed.
Redundancy is a good thing for safety.
2013-09-09 21:21:32 -04:00