Commit graph

77 commits

Author SHA1 Message Date
Vladimir Diaz
7119973af9 Revert "[WIP] Read all files from the metadata directory"
This reverts commit 88fc74af71.
2016-02-19 16:07:19 -05:00
Vladimir Diaz
88fc74af71 [WIP] Read all files from the metadata directory 2016-02-19 10:09:48 -05:00
Vladimir Diaz
541279be7a Minor cosmetic edit to repository_tool.py 2016-02-11 10:07:32 -05:00
Vladimir Diaz
35ce49707c Do not store exception message in temporary variables 2016-01-28 15:22:20 -05:00
Vladimir Diaz
1f16868775 Review repository_tool.py 2015-10-27 17:49:25 -04:00
Vladimir Diaz
4cb851ca0a Fix remaining issues with unit tests after implementing version numbers in snapshot.json 2015-10-27 16:11:11 -04:00
Vladimir Diaz
987411ff04 Resolve remaining issues with writing / loading the new changes 2015-10-20 09:16:39 -04:00
Vladimir Diaz
e3847026c9 Fix issue where incorrect version number is added to versiondict in snapshot.json 2015-09-22 10:02:40 -04:00
Vladimir Diaz
a75db24b67 Update repository_tool.py
Fix typographical error.
2015-08-31 18:21:04 -04:00
Vladimir Diaz
14d9f33831 Minor edits to text 2015-08-26 11:49:04 -04:00
Vladimir Diaz
1c8f41b0c0 Update import statements of unvendored dependencies 2015-06-02 08:29:22 -04:00
Vladimir Diaz
3293745d05 Improve code coverage for repository_tool.py 2015-04-02 16:38:18 -04:00
Vladimir Diaz
0952cd7760 Properly load the paths of nested delegations.
Fix issue reported by Andrew: load_repository() fails to load the paths of nested delegations.
2014-08-20 09:49:57 -04:00
Vladimir Diaz
68b3344368 Fix default console log level so that status() prints INFO-level messages.
The default log level was switched to WARNING but prevents status() from printing messages as expected.
Modify the log level of 'Saving <role>.json' message so that it doesn't clog status().
Thank you @hrdarji for testing the documentation and reporting the non-printing behavior of status().
2014-08-19 15:20:59 -04:00
vladdd
7711649469 Merge branch 'develop' of https://github.com/vladimir-v-diaz/tuf into develop 2014-06-30 14:06:27 -04:00
vladdd
7be31965e7 Minor edits. 2014-06-29 21:33:22 -04:00
Vladimir Diaz
d5c56e550d Add test condition for repository_tool.Target().add_target() custom data. 2014-06-24 08:58:29 -04:00
vladdd
88d686b258 Initial implementation of custom FILEINFO 2014-06-23 13:33:01 -04:00
vladdd
4e3b40cd95 Minor edits to repository_tool.py. 2014-06-22 20:01:28 -04:00
vladdd
c22a3a5307 Fix expected format of the 'method_name' argument. 2014-06-18 15:17:38 -04:00
Vladimir Diaz
9a90a808e9 Update comments and add missing docstrings in PR #216.
Update add_target_to_bin() and remove_target_from_bin().
2014-06-18 12:39:01 -04:00
Vladimir Diaz
fd60208782 Merge branch 'remove_target_from_bin' of https://github.com/dachshund/tuf into dachshund-remove_target_from_bin 2014-06-18 09:22:42 -04:00
Vladimir Diaz
cbde52c0f7 Allow partial metadata to be properly loaded with zero good signatures.
Previously, the repository tool allowed partial metadata to be written with zero good signatues and later successfully loaded.  However, the partial metadata was not properly marked by load_repository().  The 'partial_loaded' flag is now set (if partial metadata is written with zero good signatures) and matches the behavior of partial_write().
2014-06-10 08:47:10 -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
65f30a7bd8 Improve test coverage.
Update unit tests for pycrypto_keys, schema, ed25519_keys, and affected modules.
2014-05-30 12:47:33 -04:00
Vladimir Diaz
dc167e4a27 Address Python 3.2 byte-string compatibility issues. 2014-05-29 12:59:36 -04:00
Vladimir Diaz
71b1d38c1b Update slow retrieval server and fix integration tests.
Update the slow retrieval server, integration tests, and the download module to address issues with unexpected exceptions and bytes.
2014-05-28 12:11:31 -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
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
3e2bcb1089 Merge pull request #213 from SantiagoTorres/expiration_timedelta_fix
Fixes wrong schema when adding an expiration that contains microseconds
2014-05-06 09:12:24 -04:00
dachshund
e063447f1e Minor edits. 2014-05-05 11:50:58 -04:00
Santiago Torres
13da4c5b4a Updated side effects in the repository tool expiration setter
The expiration setter's docstring now mentions the fact that the
microseconds value in the given datetime object will be discarded if it
is non-zero.
2014-05-05 11:12:23 -04:00
dachshund
b1f85310de Prototype on removing targets from bins. 2014-05-05 03:22:55 -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
46fbfb3bc2 Fixes wrong schema when adding an expiration that contains microseconds
In the case we want a different expiration date on any role, we are
adviced to do this:

  repo.role.expiration = datetime.datetime(some value).

In the case we want to use a date somewhere in the future, a normal
approach would be to use time deltas:

  repo.role.expiration = datetime.today() + timedelta(weeks=x)

If we use this method we won't be able to set the value since we are
most probably producing a datetime object that contains *microseconds*.
According to the python specification, the timestamp produced will
contain the microseconds value unless it is 0.

The simple fix for this issue is to force the microseconds value to be 0
before working with the datetime object.
2014-05-02 19:30:02 -04:00
Vladimir Diaz
d831187949 Improve test coverage. 2014-05-01 12:59:34 -04:00
Vladimir Diaz
a8406604d7 Implement add_target_to_bin(), outlined in Issue #180. 2014-04-30 12:46:37 -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
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
1935b1de2b Update TUF modules affected by the change to the 'expires' format. 2014-04-15 12:52:35 -04:00
vladdd
6a4c82cc81 Finish test case for write(). 2014-04-11 07:35:02 -04:00
Vladimir Diaz
e018c76c1e Finish test cases for the methods of Targets(). 2014-04-10 11:34:40 -04:00
Vladimir Diaz
666bb7ba9e Update repository_tool.py.
Add remaining test cases for the methods of repository_tool.Metadata().
Add test case for repository_tool.Repository.get_filepaths_in_directory().
2014-04-09 12:43:31 -04:00
Vladimir Diaz
af8d2fb98e Finish remaining test cases for repository_tool.py functions. 2014-04-08 14:56:39 -04:00
Vladimir Diaz
4ad679062f Continue updating test_repository_tool.py.
Add test cases for the generate_*_metadata() functions.
2014-04-08 12:31:06 -04:00
vladdd
0f3cdd9f61 Continue updating test_repository_tool.py.
Add test cases for the crypto funtions (e.g., generate_and_write_ed25519_keypair()).
Add test case for get_metadata_filenames().
Add test case for get_metadata_fileinfo().
Add setUpClass() and tearDownClass().
Update affected functions that failed testing, and any that needed modifying (such as util.py).
2014-04-07 20:21:39 -04:00