Commit graph

126 commits

Author SHA1 Message Date
Sebastien Awwad
d98152bc9d
Remove some unnecessary try-reraise constructions; thanks, pylint!
These changes simplify logic, removing some try/except structures
that were unnecessary and potentially confusing, and get us back
to passing pylint's test.

pylint 2.0.0 adds try-except-raise tests, to catch immediate
re-raising after catching an exception, outside of some special
cases. See this GitHub comment for more info:
https://github.com/theupdateframework/tuf/pull/770#issuecomment-412993992

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-08-21 14:59:29 -04:00
Vladimir Diaz
8f65fa4154
Rename license files in modules
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-02-05 11:31:19 -05:00
Vladimir Diaz
ffdfaa92da
'repositories' map file attribute should be a list of names
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-14 16:35:10 -05:00
Vladimir Diaz
6d2318f44a
Add mapfile SCHEMA
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-14 15:40:45 -05:00
Vladimir Diaz
ec95a0d30f
Resolve conflicts
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:53:57 -05:00
Vladimir Diaz
ba0644abc9
Fix the mapping schema and a few comments
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:32:45 -05:00
Vladimir Diaz
c29c576022
Add schemas for some of the map file attributes
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:32:36 -05:00
Vladimir Diaz
d7e8754331
Fix parameter name and mapping schema
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:31:21 -05:00
Vladimir Diaz
edc53b165a
Fix mapping schema
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:31:17 -05:00
Vladimir Diaz
b75fcba618
Verify that the mapping attribute contains the required fields
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:31:02 -05:00
Vladimir Diaz
3894bc4e31
Add copyright and license info to module files
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-30 13:23:38 -05:00
Vladimir Diaz
49bbf577b0
Resolve remaining Pylint warnings in formats.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-20 14:10:23 -05:00
Vladimir Diaz
bb8729487d
Resolve Pylint's identified [E]rrors in the codebase
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-15 16:34:34 -05:00
Vladimir Diaz
8de5c69f39
Add check for supported major version of specification 2017-08-28 16:13:05 -04:00
Vladimir Diaz
924b97d1d7
Resolve conflicts 2017-08-28 13:07:54 -04:00
Vladimir Diaz
1afd968725
Remove schemeta related to compression and update unit tests 2017-08-25 12:52:11 -04:00
Vladimir Diaz
ce5e920a7d
Fix python3 error with string.lower() 2017-07-13 11:45:19 -04:00
Vladimir Diaz
a384933195
Edit the format of _type entries, which are now lowercase 2017-07-12 15:05:17 -04:00
Vladimir Diaz
a15c413975 Move tuf-related schemata from securesystemslib to tuf.formats.py 2017-01-11 11:32:08 -05:00
Vladimir Diaz
f9660b4797 More import statementment replacements to various modules 2017-01-10 17:05:12 -05:00
Vladimir Diaz
33920a8184 Use crypto-related formats from SSL in tuf.formats.py 2017-01-09 16:58:40 -05:00
Vladimir Diaz
ea63aafec6 Use SCHEMA.AnyString() rather than SCHEMA.String('')
Also update test_formats.py
2016-12-01 11:24:14 -05:00
Vladimir Diaz
b6b333c625 Add schema and metadata entries for the TUF specification version number 2016-12-01 09:54:17 -05:00
Vladimir Diaz
b458cb22df Add missing functionality in formats.py
Some of the tuf-related schemas in formats.py were moved to ssl_crypto.formats.py.  They are needed in tuf's formats.py
2016-12-01 09:43:02 -05:00
Vladimir Diaz
5d14de8a61 Merge branch 'tuf_merge' of https://github.com/baloyan/tuf into baloyan-tuf_merge
Conflicts:
	tests/test_formats.py
	tests/test_updater.py
	tuf/client/updater.py
	tuf/formats.py
	tuf/repository_lib.py
2016-11-09 14:32:59 -05:00
Vladimir Diaz
e6a4b5eef0 Rename TARGETFILE_SCHEMA to TARGETINFO_SCHEMA 2016-11-07 11:41:34 -05: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
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
Evan Cordell
a11709000d Add root versioning for root key rotation 2016-09-19 15:18:20 -04:00
Vladimir Diaz
83eb466055 Add repository.writeall() and repository.write(), and rename backtrack to terminating 2016-09-15 15:27:19 -04:00
Vladimir Diaz
f9e22f0b36 Add function to mark roles as dirty and update setup.py to list tuf.py 2016-08-25 14:22:31 -04:00
Vladimir Diaz
6797db9d25 Finish coverage for sign_metadata() and generate_targets_metadata() 2016-08-17 09:55:25 -04:00
Vladimir Diaz
65d23fa5a7 Reference all metadata in <version>.rolename.json format 2016-07-14 10:31:16 -04:00
Vladimir Diaz
13bf2de347 Merge branch 'remaining-1.0-tasks' of github.com:vladimir-v-diaz/tuf into keyids_multihash_algorithms
Conflicts:
	tuf/formats.py
2016-06-17 10:11:44 -04:00
Vladimir Diaz
45afab517f Set the expected default keyid in _get_keyid() 2016-06-17 09:44:40 -04:00
Vladimir Diaz
577e75a6aa Add support for key expiration 2016-06-13 12:21:09 -04:00
Vladimir Diaz
ba0f9ca936 Initial changes for multihash keyid algorithms support on write 2016-06-08 16:49:13 -04:00
Vladimir Diaz
685e6a2d33 Proof of concept
Initial implementation: key IDs may be generated with multiple hash algorithms
2016-05-18 16:12:58 -04:00
Vladimir Diaz
e3a1544070 Begin implementation changes to address issue with a global role and key database 2016-05-06 12:13:57 -04:00
Vladimir Diaz
b8ce4bbfcd Implement changes to write and load the new format of snapshot.json
The repository tools should properly write and load consistent versions of root.json and snapshot.json.  Version numbers were previously prepended to these two roles.
2016-04-14 08:13:50 -04:00
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