Commit graph

1590 commits

Author SHA1 Message Date
Vladimir Diaz
ddb8b00948 Merge pull request #205 from vladimir-v-diaz/develop
Address Issue #146.  Replace custom datetime format with ISO 8601.
2014-04-19 14:47:35 -04:00
vladdd
7b4c3218e1 Remove extraneous example files. 2014-04-19 14:39:47 -04:00
vladdd
5f94d5be0d Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
zanefisher
a4c483f5c6 Add headers for sections to be added. 2014-04-17 16:19:20 -04:00
zanefisher
b89bb02730 remove whitespace and empty lines from examples 2014-04-17 15:51:26 -04:00
SantiagoTorres
58d5f1f103 Merge pull request #1 from zanefisher/patch-1
fixes to headers and links
2014-04-17 15:45:40 -04:00
zanefisher
69c88e2328 fixes to headers and links 2014-04-17 15:43:43 -04:00
Vladimir Diaz
919fb0ff8f Log warning if top-level metadata expires soon. 2014-04-17 12:27:28 -04:00
Vladimir Diaz
b147ff788a Merge branch 'develop' of https://github.com/vladimir-v-diaz/tuf into develop 2014-04-15 13:26:25 -04:00
Vladimir Diaz
62f5b0689b Update UNIX_TIMESTAMP_SCHEMA comment. 2014-04-15 13:25:33 -04:00
Vladimir Diaz
0f86447eac Update tuf-spec.txt
Update time format.
2014-04-15 13:23:41 -04:00
Vladimir Diaz
f497f19998 Update README.md
Update the expiration object expected by Targets().expiration
2014-04-15 13:00:34 -04:00
Vladimir Diaz
fa37cffd54 Update the integration tests affected by the change to the 'expires' format. 2014-04-15 12:54:27 -04:00
Vladimir Diaz
b6cd82d75c Update the unit tests affected by the change to the 'expires' format. 2014-04-15 12:53:46 -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
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
Vladimir Diaz
25e800a59c Re-generate 'tests/repository_data' to include metadata unix timestamps. 2014-04-15 12:43:12 -04:00
Vladimir Diaz
973e8d1297 Merge pull request #203 from vladimir-v-diaz/develop
Add test_repository_tool.py
2014-04-11 07:55:42 -04:00
vladdd
6a4c82cc81 Finish test case for write(). 2014-04-11 07:35:02 -04:00
Vladimir Diaz
19bc1f326e [WIP] Add test case for repository.write(). 2014-04-10 12:59:42 -04:00
Vladimir Diaz
e018c76c1e Finish test cases for the methods of Targets(). 2014-04-10 11:34:40 -04:00
Vladimir Diaz
4ddd5a417c Update repository tool diagram.
Add missing 'repository_tool.Metadata.signatures' to the diagram.
2014-04-09 12:52:20 -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
81c2748859 Add test cases (skeleton) for remaining methods of test_repository_tool.py. 2014-04-08 15:19:40 -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
vladdd
ddd8b6bfd0 Add test_repository_tool.py
Add 'test_repository_tool.py' (initial incomplete commit)
Add test cases for the top-level metadata objects (Root(), Targets(), etc.)
Add test case for Repository()
Add test case for get_target_hash()
Minor update to 'repository_tool.py': add default rolename for Targets() and call tuf.util.get_target_hash() in the
repository tool's get_target_hash()
2014-04-07 15:28:46 -04:00
Vladimir Diaz
77fd5e8efa Merge pull request #202 from vladimir-v-diaz/develop
Refactor test_extraneous_dependencies_attack.py.
2014-04-06 21:34:25 -04:00
vladdd
5755207fae Refactor test_extraneous_dependencies_attack.py.
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools.  Modify the previous scenario
simulated for the mix-and-match attack.  The metadata that specified the
dependencies of a project modified (previously a text file.)
2014-04-06 21:28:42 -04:00
Vladimir Diaz
47959e6871 Merge pull request #201 from vladimir-v-diaz/develop
Refactor test_mix_and_match_attack.py
2014-04-06 16:19:57 -04:00
vladdd
75a7124bb1 Refactor test_mix_and_match_attack.py.
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools.  Modify the previous scenario
simulated for the mix-and-match attack.
2014-04-06 16:17:14 -04:00
Vladimir Diaz
31464663d9 Merge pull request #200 from vladimir-v-diaz/refactor_test_slow_retrieval_attack
Refactor test_slow_retrieval_server.py.
2014-04-05 21:23:33 -04:00
vladdd
714df40e2d Refactor test_slow_retrieval_server.py.
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools. Expanded comments and modified
previous setup.

Minor edits to slow_retrieval_server.py.

Add missing else clauses (to detect when TUF fails to prevent an attack) for a couple of the integrations tests.
2014-04-05 21:21:10 -04:00
Vladimir Diaz
29bd2d8569 Merge pull request #199 from vladimir-v-diaz/refactor_test_replay_attack
Refactor test_replay_attack.py
2014-04-05 15:30:21 -04:00
vladdd
ba19cd7b72 Refactor test_replay_attack.py.
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools. Expanded comments.
2014-04-05 15:27:27 -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
SantiagoTorres
c35d50e310 Update README-developer-tools.md
Updated the document with mentions to project names and to fix general redaction issues.
2014-04-04 17:27:47 -04:00
Santiago Torres
ab765d6c85 Ran a spellchecker on the readme document
Also did a minor proofreading effort. A more thorough proofread will me
made after finishing the whole document.
2014-04-04 14:36:01 -04:00
Santiago Torres
30b97a8a7a Changed the logger tag
tuf.devtools -> tuf.developer_tool
2014-04-04 14:08:17 -04:00
Trishank Karthik Kuppusamy
d52150e187 Merge pull request #197 from vladimir-v-diaz/develop
Add error message for clients that lack a required crypto library.
2014-04-03 19:42:20 -04:00
Santiago Torres
e220669357 Merge branch 'develop' of github.com:theupdateframework/tuf into developer-tools 2014-04-03 14:01:24 -04:00
Santiago Torres
1a353c08d4 Added support for project names.
Project name is now an argument of the project constructor and the
create_new project function.

The project_name field defines the rolename to add to the roledb, the
filename to create and adds a new field to the project.cfg file.
2014-04-03 14:00:33 -04:00
Vladimir Diaz
7314f782aa Add error message for clients that lack a required crypto library.
TUF's crypto dependencies was recently changed: ED25519 signatures supported by default, and require PyCrypto or tuf[tools] to verify RSASSA-PSS signatures.
The error returned for clients that tried to verify rsassa-pss signatures without the required library was bad.  Error message returned now:

$ basic_client.py --repo http://localhost:8001
Error: No working mirror was found:
  localhost:8001: Metadata downloaded from the remote repository specified an RSA signature.  Verifying RSA signatures requires PyCrypto.
$ pip install PyCrypto, or pip install tuf[tools].
2014-04-03 13:18:58 -04:00
Vladimir Diaz
c35c5f0076 Merge pull request #196 from vladimir-v-diaz/develop
Edits to test_indefinite_freeze_attack.py
2014-04-03 12:38:41 -04:00
Vladimir Diaz
9d2a5e2927 Minor edit to comment in test_indefinite_freeze_attack.py. 2014-04-03 12:35:16 -04:00
Vladimir Diaz
053e2b0ebe Update test_indefinite_freeze_attack.py
Minor edit to comment.
Disable console log messages enabled by the repository tool, which this unit tests needs.
Sleep for at least 1 minute before checking for an expired metadata error, and ensure the function supplied to self.assertraises() is a callable.
2014-04-03 12:30:43 -04:00
Vladimir Diaz
be69684323 Merge pull request #195 from vladimir-v-diaz/refactor_test_endless_data_attack
Refactor test_endless_data_attack.py
2014-04-03 12:05:19 -04:00
Vladimir Diaz
b52194cdf4 Refactor test_endless_data_attack.py
Refactored 'test_endless_data_attack.py' to use the 'unittest' module (test
conditions in code, rather than verifying text output), use pre-generated
repository files, and discontinue use of the old repository tools. Minor
edits to the test cases.
2014-04-03 11:59:50 -04:00
Vladimir Diaz
9cbd3f1d21 Merge pull request #194 from vladimir-v-diaz/refactor_test_indefinite_freeze_attack
Refactor test indefinite freeze attack
2014-04-03 08:57:52 -04:00