Commit graph

86 commits

Author SHA1 Message Date
Vladimir Diaz
5ac9440edd Emphasize exclusive-or paths in formats.make_versioninfo() 2016-02-22 16:16:44 -05:00
Vladimir Diaz
f580811202 Minor wording change in docstring of formats.make_versioninfo() 2016-02-22 16:11:52 -05:00
Vladimir Diaz
012e99ea2d Remove unneeded information in Side Effects field of doctstring 2016-02-22 16:07:38 -05:00
Vladimir Diaz
c2d1a0e9d6 Merge branch 'develop' of github.com:theupdateframework/tuf into 1.0-review2 2016-01-27 17:11:50 -05: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
Vladimir Diaz
69bcd16680 Explain in formats.py that functions may set further restrictions on schemas 2016-01-26 14:49:37 -05:00
David Halls
4172479d39 Fix Python 3 errors
- Signing data should be byte strings
- Don't log exception outside handler (#300)
2016-01-04 22:00:13 +00:00
Vladimir Diaz
d027d88312 Review of 'formats.py' changes 2015-10-27 16:40:02 -04:00
Vladimir Diaz
987411ff04 Resolve remaining issues with writing / loading the new changes 2015-10-20 09:16:39 -04:00
Vladimir Diaz
ed1f217022 Implement changes for _update_metadata() 2015-10-15 09:49:32 -04:00
Vladimir Diaz
3fc1e59000 Initial implementation of stored version numbers in snapshot.json 2015-09-22 07:31:30 -04:00
Vladimir Diaz
398555f32e Review edits up to create_rsa_encrypted_pem().
Add checks against invalid 'data' arguments in relevant functions.
2015-08-28 17:24:57 -04:00
Vladimir Diaz
1c8f41b0c0 Update import statements of unvendored dependencies 2015-06-02 08:29:22 -04:00
vladdd
fde19957a4 Merge branch 'developer-tools' of https://github.com/SantiagoTorres/tuf into SantiagoTorres-developer-tools 2014-06-30 07:10:56 -04:00
vladdd
88d686b258 Initial implementation of custom FILEINFO 2014-06-23 13:33:01 -04:00
Santiago Torres
915f07a88a Merge branch 'develop' of github.com:theupdateframework/tuf into developer-tools 2014-06-20 17:35:17 -04:00
vladdd
8a47f5fe4d Minor cosmetic edits to formats.py 2014-06-15 22:02:07 -04:00
Santiago Torres
533fda5608 Merge branch 'develop' of github.com:theupdateframework/tuf into developer-tools 2014-06-13 15:40:39 -04:00
vladdd
744be00cbc Initial implementation of authoritative delegations. 2014-06-07 20:29:18 -04:00
Vladimir Diaz
fbb10a36c9 Refactor repository_tool.py and improve test coverage.
Created repository_lib.py.
2014-06-03 14:32:44 -04:00
Vladimir Diaz
dc167e4a27 Address Python 3.2 byte-string compatibility issues. 2014-05-29 12:59:36 -04:00
Santiago Torres
ce7316512c Merge branch 'develop' of github.com:theupdateframework/tuf into developer-tools 2014-05-28 11:44:28 -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
bc99524e2b Finish initial refactor of slow retrieval attack. 2014-05-13 12:53:50 -04:00
vladdd
c5fd17ab3e Merge branch 'develop' of https://github.com/theupdateframework/tuf into develop
Conflicts:
	tests/test_hash.py
	tests/test_keydb.py
	tuf/formats.py
	tuf/keydb.py
	tuf/repository_tool.py
2014-05-10 20:26:06 -04:00
Vladimir Diaz
8684253675 [WIP] Python 2+3.
Mostly unicode-related changes for crypto modules.
2014-05-06 15:24:39 -04:00
vladdd
c9e3b6046e Address Issue #214.
Allow validation of specific libraries rather than checking all of them in check_crypto_libraries().
Log warning if the repository tool is imported but has not been properly installed: $ pip install tuf[tools].
Modify format string of console log messages.
2014-05-03 18:03:25 -04:00
Santiago Torres
cc7f69ea30 Merge branch 'develop' of github.com:theupdateframework/tuf into developer-tools 2014-05-02 16:29:12 -04:00
Vladimir Diaz
d831187949 Improve test coverage. 2014-05-01 12:59:34 -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
Santiago Torres
36c3f2c1d2 Added schema check and project.cfg schema
There is a new entry in tuf.formats.py that represents the layout of the
project.cfg file. This new schema will be used to check for sanity upon
loading the .cfg file in the load_project function
2014-04-24 18:51:35 -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
5f94d5be0d Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
Vladimir Diaz
919fb0ff8f Log warning if top-level metadata expires soon. 2014-04-17 12:27:28 -04:00
Vladimir Diaz
62f5b0689b Update UNIX_TIMESTAMP_SCHEMA comment. 2014-04-15 13:25:33 -04:00
Vladimir Diaz
91242ec6ab Modify the expiration date format included metadata.
Convert the 'expires' field of metadata to a Unix/POSIX timestamp (previously a custom string format.)
Replace tuf.formats.py functions 'format_time()' and 'parse_time()' with unix_timestamp_to_datetime() and datetime_to_unix_timestamp().
Update affected schemas.
2014-04-15 12:50:40 -04:00
vladdd
48bd9f7040 Update formats.py and repository_tool.py.
repository_tool.targets.delegate_hashed_bins():

Edit comments, add logging information, and rename 'max_number_of_bins' (now 'total_hash_prefixes') for clarity.
Fix expected value of 'number_of_bins' (power of 2 instead of multiple of 16.)
Remove the 'self' argument in get_filepaths_in_directory() (now a staticmethod.)

formats.py:
NUMBINS_SCHEMA may now start from 1 (allow the creation of 1 delegated hashed bin.)
2014-04-04 18:03:27 -04:00
Vladimir Diaz
eaee52e14e [WIP] Refactor test_updater.py
Continue refactoring the test cases of test_updater.py.
Fix issue where repository_tool.py was not writing new compressed metadata.
Minor edits to TUF modules.
2014-03-13 12:31:36 -04:00
vladdd
784b3bcf46 Update modules reviewed by Monzur.
Update keys.py and pycrypto_keys.py following Monzur's code review.
Update affected modules.
2014-02-25 20:33:48 -05:00
Vladimir Diaz
00c69116aa Implement key format requested in issue #171.
Exclude the 'private' attribute from metadata key objects, and when calculating keyids.
2014-02-13 12:10:12 -05:00
Vladimir Diaz
36b59f922e Continue updating unit tests and modify ROOT_SCHEMA. 2014-01-30 08:11:35 -05:00
Vladimir Diaz
009ddd9f37 Rename top-level role and functions of repository_tool.py. Update documentation and diagram.
add_key() -> add_verification_key()
remove_key() -> remove_verification_key()
release.json -> snapshot.json
Update repository_tool-diagram.png
Update README following the renamed functions and release role changes.
Minor edits, such as removing lint left over from a previous merge conflict.
2014-01-29 11:26:56 -05:00
Vladimir Diaz
5d1906a239 Update issues #151 and #137.
Update docstrings and comments and complete the initial implementation of issue 151.
Adjust logger level for tuf.download._check_downloaded_length().
Initial implementation of issue 137.
2014-01-21 14:42:28 -05:00
Vladimir Diaz
a9d90e7ce0 Finish initial implementation of Issue #151 and reading consistent snapshots.
Support multiple hash algorithms, where the generated digests of metadata and
target files is included in metadata (and filenames if 'consistent_snapshots'
is True).  Previously, only a single hash algorithm was supported, and it was
set by default to 'sha256' in code.  Repository maintainers may now choose any,
and/or multiple, hash algorithms from those supported by TUF.  By default,
'sha256' is used when generating digests.

Support the recent change to the TUF specification, where writing consistent
snapshots may include N versions of identical metadata and targets, if N hash
algorithms is used by the repository when generating metadata.

Update code affected by the recent changes to the specification, such as
targets that may include digests in their filename.

Support consistent snapshots of compressed metadata, including repositories
that provide multiple versions of metadata with different digests included
in their filenames.

The repository tools can now load repositories that include consistent snapshots
of metadata and targets, including those with multiple (i.e., multiple digests
prepended to filenames) consistent snapshots of files.

The client code may now read repositories with 'consistent_snapshots': true in
Root metadata, and properly request and update files with digests included.
2014-01-17 11:05:40 -05:00
Vladimir Diaz
85a120f0b7 Initial implementation of Issue #151.
Initial implementation of writing consistent snapshots

Update Root schema
Support writing metadata in rolename.ext and digest.rolename.ext formats.
Modify libtuf.py methods that walk and extract metadata to recognize the digest.rolename.ext format.
Write root.txt and timestamp.txt if consistent_snapshots is True.
Support automatic version increments of delegated metadata.
2014-01-14 10:01:17 -05:00
Vladimir Diaz
04221d3f0d Address issue #163.
Changed behavior:
Write metadata only if the uncompressed version has not been written, has changed, or if
compressed versions are missing (if requested).  Not only is re-saving unmodified metadata not ideal, it also forces a new version of the release file if compressed metadata is rewritten.  gzip attaches a timestamp to compressed files, which may cause compressed content to generate different digests if independently written.

Update libtuf.py comments.
Minor edit to docstrings of previous commit that addressed interposition issues.
2014-01-13 09:34:21 -05:00
Vladimir Diaz
8a805bdc3f Fix pycrypto_keys.py header block, libtuf.py doc update, and minor formats.py schemas edit 2013-12-20 12:47:27 -05:00
Vladimir Diaz
d07d0b2139 Fix typo 2013-12-16 15:00:02 -05:00
Vladimir Diaz
d3abb07092 Update formats.py readability
Ensure consistent spacing in all SCHEMA definitions.
2013-12-16 14:57:48 -05:00
Vladimir Diaz
68eedeb477 Initial commit for Issue #143 and #144 2013-12-09 11:11:23 -05:00