Vladimir Diaz
ad29eee3aa
Add remaining test conditions for multiple repository support for the repository tool
2017-02-13 16:03:26 -05:00
Vladimir Diaz
7eb49c46ad
Minor edits to MultiRepoUpdater and map.json
...
Incorrect variable names, expand comments, etc.
2017-02-10 15:59:19 -05:00
Vladimir Diaz
89942aaad8
Add map.json (needed for testing TAP 4 behavior)
2017-02-10 15:19:59 -05:00
Vladimir Diaz
1f70402967
Add test condition for repository tool and support for multiple repositories
2017-02-08 17:16:30 -05:00
Vladimir Diaz
077313f0cb
Edit remaining test cases for repository_lib.py
2017-02-08 15:15:07 -05:00
Vladimir Diaz
5cdb0a27d8
Fix remaining unit test failures for repository_tool.py
...
Update repository_lib.py to support multiple repositories (TODO: fix remaining unit tests failures for this module)
2017-02-08 11:56:17 -05:00
Vladimir Diaz
bd2bdee39d
Update repository_tool unit tests to support multiple repositories (repository_lib.py remains)
2017-02-07 16:48:33 -05:00
Vladimir Diaz
7aff0572ba
Add missing unit tests for last commit
2017-02-06 16:20:28 -05:00
Vladimir Diaz
90155962a7
Fix unit tests to use tuf.settings.repositories_directory
2017-02-06 16:19:58 -05:00
Vladimir Diaz
17ea827e76
Add repository data where the client directory is reorganized
2017-02-06 16:14:35 -05:00
Vladimir Diaz
71525d0187
Add test conditions
2017-02-03 14:25:08 -05:00
Vladimir Diaz
802644cb61
[WIP] Add a unit test for multiple repositories support
2017-02-03 10:32:45 -05:00
Lukas Puehringer
c161020fb2
Updates repository_lib to use securesystemslib
...
securesystemslib.interface copies functions to generate and
import keys from repository_lib.
This commit replaces those function implementations with calls
to securesystemslib.
Removes internal _prompt and _get_password from repository_lib
because they were only used by the removed function bodies and
also exist in securesystemslib.interface
2017-01-27 17:07:43 -05:00
Vladimir Diaz
9579a1a0d8
Fix import statements for test_slow_retrieval_attack.py
2017-01-12 15:23:53 -05:00
Vladimir Diaz
5e22d02b17
Fix import statements for the repository_data tools
2017-01-12 15:23:16 -05:00
Vladimir Diaz
0b4d4d25f1
Fix import statements for the tools
2017-01-12 15:22:24 -05:00
Vladimir Diaz
6080a4f3b3
Remove simple-settings dependency from aggregate_tests.py
2017-01-12 15:20:03 -05:00
Vladimir Diaz
b9cd2853ea
Fix import statements in the root rotation integration tests
2017-01-12 10:52:05 -05:00
Vladimir Diaz
b79db21d9a
Fix import statements in interposition modules
2017-01-12 10:50:13 -05:00
Vladimir Diaz
23339f3554
Remove ssl_crypto entry from coverage configuration file
2017-01-12 10:49:40 -05:00
Vladimir Diaz
4abe845daf
Fix import statements in various test modules
2017-01-11 17:05:46 -05:00
Vladimir Diaz
3ebf76182d
Fix imports statements in test_arbitrary_package_attack.py
2017-01-11 16:41:13 -05:00
Vladimir Diaz
e5c002695b
Fix import statements in test_extraneous_dependencies_attack.py
2017-01-11 16:36:07 -05:00
Vladimir Diaz
361eee1bbf
Fix imports statements in test_replay_attack.py
2017-01-11 16:00:04 -05:00
Vladimir Diaz
657e1fa382
Fix import statements in updater.py and test_endless_data_attack.py
2017-01-11 15:55:36 -05:00
Vladimir Diaz
fb0ea0b836
Fix more import statements for various modules
2017-01-11 15:41:13 -05:00
Vladimir Diaz
bf26aa38f2
Fix import statements in log.py and test_log.py
2017-01-11 12:51:04 -05:00
Vladimir Diaz
97f5e107df
Fix imports statements in roledb.py and test_roledb.py
2017-01-11 12:43:04 -05:00
Vladimir Diaz
94bb9d6d9f
Fix import statements in sig.py and test_sig.py
2017-01-11 12:23:21 -05:00
Vladimir Diaz
6ada1d352d
Fix import statements in test_init.py
2017-01-11 11:43:19 -05:00
Vladimir Diaz
a15c413975
Move tuf-related schemata from securesystemslib to tuf.formats.py
2017-01-11 11:32:08 -05:00
Vladimir Diaz
301965ff2e
Fix import statements for download.py and test_download.py
2017-01-11 10:46:22 -05:00
Vladimir Diaz
f9660b4797
More import statementment replacements to various modules
2017-01-10 17:05:12 -05:00
Vladimir Diaz
ae59f8ff5b
Remove test_schema.py
2017-01-09 17:03:16 -05:00
Vladimir Diaz
a285f06689
Remove crypto-related tests (they now exist in the SSL module)
2017-01-09 17:02:13 -05:00
Vladimir Diaz
03d98b1cd3
Fix SSL statements in test_keydb.py
2017-01-09 16:53:23 -05:00
Vladimir Diaz
2bfc799439
Add test metadata that includes the spec version number
2016-12-01 11:28:42 -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
8da0d92f44
Update ssl_crypto submodule and propogate changes to TUF
2016-11-16 11:08:22 -05:00
Vladimir Diaz
fe3aa99d59
Add coverage for remove_obsolete_targets()
2016-11-14 16:40:26 -05:00
Vladimir Diaz
f15b03ddb0
Cover remaining code coverage for repository_tool.py
2016-11-11 17:19:22 -05:00
Vladimir Diaz
fd816a69ac
Cosmetic edits and minor code coverage improvement to repository_tool.py
2016-11-11 12:30:24 -05:00
Vladimir Diaz
4845e8c54d
Code coverage for 4 more methods
2016-11-11 11:52:14 -05:00
Vladimir Diaz
5e8bef7c72
Add some coverage for repository_tool.py
2016-11-10 16:58:59 -05:00
Vladimir Diaz
acf5bfddac
Add coverage for _delete_obsolete_metadata()
...
This function was recently updated to ignore root.json (and continue). Add coverage for it now
2016-11-10 16:21:57 -05:00
Vladimir Diaz
cfaf865186
Force Coverage to ignore the scripts like basic_client.py and vendor'd modules
2016-11-10 16:17:13 -05:00
Vladimir Diaz
0e34e06d89
Add a test condition for the previously added feature for issue #319
2016-11-10 14:40:47 -05:00
Vladimir Diaz
0d59cac627
Fix remaining issues
2016-11-10 09:49:08 -05:00
Vladimir Diaz
e999f55a5d
Fix remaining test modules that try to import tufformats.
2016-11-10 09:24:33 -05:00
Vladimir Diaz
b1367430d7
Replace instances of tufformats in test modules
2016-11-09 17:10:05 -05:00
Vladimir Diaz
ddde0d700b
Remove tufformats from test_formats.py
2016-11-09 15:58:29 -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
c65129ad7e
Update tests following rename of target()
2016-11-07 12:33:08 -05:00
Vladimir Diaz
e6a4b5eef0
Rename TARGETFILE_SCHEMA to TARGETINFO_SCHEMA
2016-11-07 11:41:34 -05:00
Artiom Baloian
299ff68edd
Now crypto related files are in ssl_crypto and ssl_commons
2016-11-02 17:44:32 -04:00
Artiom Baloian
1bf7ec1135
Moved pycrypto_keys, now it is common
2016-11-02 12:35:02 -04:00
Artiom Baloian
a4dae8e1ff
Moved pyca_crypto_keys, now it is common
2016-11-02 11:50:21 -04:00
Artiom Baloian
b0156944bb
Moved util.py, now it is common
2016-11-02 09:49:37 -04: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
b21ad871b9
Now ed25519_keys.py and hash.py modules are common for
...
TuF and in-toto
2016-11-01 10:55:23 -04:00
Artiom Baloian
812a85c393
Finish splitinf formats.py file, now there is formats.py for commons
...
and tufformats which is TuF specific
2016-10-31 20:02:29 -04:00
Artiom Baloian
b07d9a5d0f
Move some part of tufformats into the common formats
2016-10-31 19:04:14 -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
0e6e3418d2
Add code coverage for non-dirty roles given to role.db.unmark_dirty()
2016-10-27 16:38:07 -04:00
Vladimir Diaz
0324263988
Verify the changed behavior of status()
2016-10-27 16:30:30 -04:00
Vladimir Diaz
986ffcb730
Add test case for unmark_dirty() in roledb
2016-10-27 15:15:50 -04:00
Vladimir Diaz
f12b5dbdda
Add code coverage for code recently added to repository_lib.py
2016-10-26 17:04:06 -04:00
Vladimir Diaz
c81fa37683
Fix unit test failure in Python 3 and add remaining code coverage for load_repository()
2016-10-26 15:46:41 -04:00
Vladimir Diaz
485eabc5a9
Reset invalid tuf.conf.CONSISTENT_METHOD in unit test
...
The invalid value should be removed so that subsequent tests work as expected
2016-10-26 13:07:04 -04:00
Vladimir Diaz
5f2956a09d
Edit to comments
2016-10-26 12:01:09 -04:00
Vladimir Diaz
18f7e65ab6
Merge branch 'develop' of https://github.com/FelixWang1994/tuf into FelixWang1994-develop
2016-10-26 10:31:54 -04:00
Kwang100
ffe2384ec9
Correct teardown function: remove temporary directory after test completed
2016-10-26 00:30:34 -04:00
Kwang100
df93e46b3b
1、minor bug correction: Now we will remove the current metadata before we link it to the consistent metadata if it exists.
...
2、import the tuf.conf into the test file; finish all the tests for link current file to the latest consistent metadata file.
2016-10-25 18:28:06 -04:00
Vladimir Diaz
aad5c94b04
Add code coverage for load_repository
2016-10-25 17:20:44 -04:00
Vladimir Diaz
d6b13cd1f2
Cover remaining code coverage for sig.py and edit comments
2016-10-25 11:49:58 -04:00
Vladimir Diaz
5ebef2db5c
Cover remaining code coverage for repository_lib.py
2016-10-24 16:41:43 -04:00
Vladimir Diaz
e58c01a96c
Catch SlowRetrievalError for download requests that expect a greater download length that the actual file
...
A slow retrieval error is eventually raised for the request that cannot be satisfied
2016-10-21 11:57:21 -04:00
Vladimir Diaz
70fc8dce36
Resolve merge conflicts with upstream and ecordell-root-versioning
2016-10-18 10:28:04 -04:00
Vladimir Diaz
58370a5a2f
Append '_integration.py' to the module name of the integration tests.
2016-10-17 16:56:08 -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
Vladimir Diaz
e1debf8ea9
Improve code coverage for repository_tool.py
2016-09-21 09:17:37 -04:00
Vladimir Diaz
070c9e0149
Test for invalid keyid in remove_invalid_and_duplicate_signatures()
2016-09-20 11:40:38 -04:00
Vladimir Diaz
35d478f1c2
Cover remaining code coverage for repository_lib.py
2016-09-20 11:02:53 -04:00
Vladimir Diaz
d75d25a4e6
Implement pyca_crypto_keys.py's create_rsa_encrypted_pem and improve code coverage for it
2016-09-19 17:21:33 -04:00
Evan Cordell
0e93c3a7d2
Enforce root version signature chaining in client updater
2016-09-19 15:18:33 -04:00
Evan Cordell
a11709000d
Add root versioning for root key rotation
2016-09-19 15:18:20 -04:00
Vladimir Diaz
b5a0cc413b
Add test repository
...
compressed metadata was incorrectly listed in snapshot.json. List on roles with '.json' extension
2016-09-15 16:33:20 -04:00
Vladimir Diaz
feb2cd0df4
Update tests to improve code coverage and following the changes to repository write and backtracking
2016-09-15 15:24:00 -04:00
Vladimir Diaz
26016479e9
Add test repository following changes to repository writing and backtracking
2016-09-15 15:19:27 -04:00
Vladimir Diaz
daa79ea640
Add code coverage for en(de)cryption functions of pyca_crypto_keys.py
2016-09-01 16:39:03 -04:00
Vladimir Diaz
2876702f48
Add code coverage for keys.extract_pem()
2016-09-01 12:53:28 -04:00
Vladimir Diaz
e620b005a8
Add remaining code coverage for repository_lib.py
2016-09-01 11:07:02 -04:00
Vladimir Diaz
5a35e797fc
Improve code coverage for test_signature()
2016-09-01 10:12:56 -04:00
Vladimir Diaz
13e118b7d2
Merge branch 'develop' of github.com:theupdateframework/tuf into develop
2016-09-01 10:11:09 -04:00
Vladimir Diaz
98c386083a
Improve code coverage for pyca_crypto_keys.py (functions for encrypted PEMs)
2016-08-31 16:11:07 -04:00
Vladimir Diaz
2a0365d332
Add test cases for _decrypt() and encrypt_key()
2016-08-31 16:09:00 -04:00
Vladimir Diaz
37dcfba999
Improve test coverage for keys.py and pyca_cryptography.py
2016-08-31 15:20:02 -04:00
Vladimir Diaz
a3c482691c
Add code coverage for pyca_cryptography via keys.py
2016-08-31 13:38:00 -04:00
Vladimir Diaz
5e2d177f4d
Add test case for _load_top_level_metadata() and debug statements to missing else clauses
2016-08-30 17:09:03 -04:00
Vladimir Diaz
c369329d93
Log debug messages for missing else statements and cover branch case in _delete_obsolete_metadata()
2016-08-30 10:56:07 -04:00
Vladimir Diaz
d4fc091da5
Add test case for newly-added tuf.roledb.mark_dirty()
2016-08-29 11:42:19 -04:00
Julian Hille
e80f352259
Handles broken metadata files gracefully like they would be missing. Should be part of #366
2016-08-29 16:51:10 +02:00
Vladimir Diaz
6ec7197002
Fix issues with writting non-dirty'd consistent snapshots
...
Improve coverage for _delete_obsolete_metadata()
2016-08-26 16:42:21 -04:00
Vladimir Diaz
0673eb6ac5
Test coverage for _delete_obsolete_metadata()
2016-08-18 08:26:53 -04:00
Vladimir Diaz
6797db9d25
Finish coverage for sign_metadata() and generate_targets_metadata()
2016-08-17 09:55:25 -04:00
Vladimir Diaz
abbda071a1
Test for invalid keytype in sign_metadata()
2016-08-16 14:32:04 -04:00
Vladimir Diaz
90477a0517
Cover remaining test cases of _write_compressed_metadata() and remove code related to prepended digests
2016-08-16 12:20:28 -04:00
Vladimir Diaz
47d94c6fc4
Fix exception raised in _write_compressed_metadata()
2016-08-16 10:40:34 -04:00
Vladimir Diaz
4e8e8dca7f
Try to hit more lines of _write_compressed_metadata()
2016-08-15 17:13:18 -04:00
Vladimir Diaz
de63311a0c
Reference global temporary directory variable by correct name
2016-08-15 14:29:56 -04:00
Vladimir Diaz
c8ffd6f8b1
Write 'interposition.json' to temporary location so that it gets auto-removed after testing
2016-08-15 14:26:50 -04:00
Vladimir Diaz
2380499029
Coverage for remaining lines of _log_status_of_top_level_roles()
2016-08-15 14:05:05 -04:00
Vladimir Diaz
2ef5f3eb68
Add test case for _write_compressed_metadata()
2016-08-15 14:02:10 -04:00
Vladimir Diaz
5f7dc52fa4
Merge pull request #352 from vladimir-v-diaz/support_wildcards_in_trusted_paths
...
Support Unix shell-style wildcards in trusted paths
2016-08-05 15:53:40 -04:00
Vladimir Diaz
c2805cc628
Fix remaining unit test failure for test_updater.py
...
Make sure <digest>.target_filename can be requested by clients. Writing a new targets.json causes consistent target files to be written to disk.
2016-08-05 15:42:08 -04:00
Vladimir Diaz
f05fdd9c05
Fix remaining test failures
2016-08-04 15:37:49 -04:00
Vladimir Diaz
81a147614b
Add initial support for specifying Unix shell-style wildcards in paths
2016-08-04 10:59:15 -04:00
Vladimir Diaz
ae4bbfdbfc
Remove tuf.Error exception raised in create_keydb_from_root_metadata()
...
To simplify the addition of keys to keydb, add all of the valid keyids to keydb in the for loop instead of adding the default keyid separately
2016-07-27 16:33:35 -04:00
Vladimir Diaz
876ced3279
Remove invalid test case (hmm, only py35 caught this mistake)
2016-07-26 14:28:08 -04:00
Vladimir Diaz
fae1fb6965
Improve code coverage for __init__.py pyca_crypto_keys.py, repository_lib.py
2016-07-25 11:20:30 -04:00
Vladimir Diaz
e0a4f18223
Improve code coverage
2016-07-21 10:28:46 -04:00
Vladimir Diaz
596969ab2e
Improve code coverage of keydb.py and util.py
2016-07-19 08:06:53 -04:00
Vladimir Diaz
a59008cf2b
Use the 'clear_all' argument with clear_roledb.py and clear_keydb.py
2016-07-15 15:24:45 -04:00
Vladimir Diaz
9c659b633c
Clear keydb and roledb (using the 'clear_all' argument) in the teardown() calls of unit tests
2016-07-15 13:53:31 -04:00
Vladimir Diaz
1c72cb2c20
Add 'clear_all' argument to clear_keydb() in keydb.py
2016-07-15 13:47:46 -04:00
Vladimir Diaz
1474dd8277
Update unit test for roledb following addition of 'clear_all_except_default' argument to clear_roledb()
2016-07-15 13:25:15 -04:00
Vladimir Diaz
65d23fa5a7
Reference all metadata in <version>.rolename.json format
2016-07-14 10:31:16 -04:00
Vladimir Diaz
70cc1b8abd
Clear roledb and keydb of 'test_repository' entries after each test case
2016-07-11 13:53:16 -04:00
Vladimir Diaz
80c3022edf
Fix mismatched key objects in test_keydb.py
2016-07-01 15:09:58 -04:00
Vladimir Diaz
e072cd9961
Verify non-None role name supplied to tuf.sig.get_signature_status()
2016-07-01 13:26:46 -04:00
Vladimir Diaz
5c7333b062
Fix unit tests for developer_tool.py
2016-07-01 12:52:04 -04:00
Vladimir Diaz
872ff7c1a1
Use correct key import function to load non-root keys in test_indefinite_freeze_attack.py
2016-06-28 17:01:38 -04:00
Vladimir Diaz
5a3f515c4a
Use correct key import statements from rest_replay_attack.py
2016-06-28 16:54:53 -04:00
Vladimir Diaz
bd5b398ee4
Remove repository.status() (used for testing) from generate.py
2016-06-28 16:54:18 -04:00
Vladimir Diaz
2a9e4c28ad
Add latest repository example and unit test fixes
2016-06-27 17:02:27 -04:00
Vladimir Diaz
80ade8f201
Minor fixes for key expiry and loading an rsa key in a test module
2016-06-17 16:05:25 -04:00
Vladimir Diaz
b777188a54
Update tests following the change to Ed25519 keys
2016-06-17 09:57:54 -04:00
Vladimir Diaz
8e0e5a19e8
Generate metadata following change to Ed25519 keys
2016-06-17 09:56:13 -04:00
Vladimir Diaz
c55f548551
Generate Ed25519 keys for tests/repository_data
2016-06-17 09:54:46 -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
005531d9eb
Finish implementing test_key_revocation
...
Following the design change to roledb and keydb (where multiple repositories are supported), test_key_revocation is updated to verify that outdated clients (e.g., root keys that are no longer trusted) are able to perform a software update, detect new keys, etc.
2016-05-16 16:05:24 -04:00
Vladimir Diaz
1bf5aa2396
Add repository_name parameters to sig.py
2016-05-16 14:26:38 -04:00
Vladimir Diaz
cc6609f3f6
Implement remaining test conditions in test_roledb.py
2016-05-11 17:50:19 -04:00
Vladimir Diaz
ad08f499e9
Add missing unit test, and update tests in roledb.py to verify 'repository_name' argument
2016-05-11 16:57:46 -04:00
Vladimir Diaz
99062dc27a
Minor edit to comment in test_keydb.py
2016-05-11 16:55:52 -04:00
Vladimir Diaz
8e4a036f56
Implement tests for create_roledb() and remove_roledb()
2016-05-09 18:00:28 -04:00
Vladimir Diaz
9d57139aee
Implement remaining test functions for keydb.py
2016-05-09 16:31:37 -04:00
Vladimir Diaz
aa62fc5862
Verify the 'repository_name' argument in test_clear_keydb()
2016-05-09 15:10:42 -04:00
Vladimir Diaz
decfa5558e
Expand test conditions in test_keydb.py to verify named repositories
2016-05-09 14:19:53 -04:00
Vladimir Diaz
223993c43e
Update test_keydb.py following refactoring of keydb.py
...
keydb.py was refactored to allow multiple sets of keys to be tracked
2016-05-06 17:33:18 -04:00
Vladimir Diaz
9d85b5f4b1
Update test_roledb.py following refactoring of roledb.py
...
refactored roledb.py to keep track of multiple sets of role info.
2016-05-06 16:54:45 -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
d09d3a0678
Address Issue #332 . Add test cases for the remaining roles of test_key_revocation.py
2016-04-28 11:00:57 -04:00
Vladimir Diaz
09163247b6
Initial integration test for key revocations
2016-04-28 09:02:58 -04:00
Vladimir Diaz
a8a8b13864
Initial changes for prepended digests and version numbers
2016-04-28 08:57:07 -04:00
Vladimir Diaz
e27371113f
Update developer tool
2016-04-14 16:53:48 -04:00
Vladimir Diaz
f2c3e09bf2
Fix remaining issues with previous implementation of _update_metadata_via_fileinfo()
2016-04-14 11:22:13 -04:00
Vladimir Diaz
3f42feba31
Add functions to update and detect fileinfo changes for root and snapshot
2016-04-14 09:08: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
c0958f11f2
Modify repository data to use new snapshot format
...
snapshot.json should list the hash(es) of root metadata, rather than version number
2016-04-14 08:11:34 -04:00
Vladimir Diaz
22b42e97b5
Remove obsolete method: refresh_targets_metadata_chain()
2016-04-06 10:54:45 -04:00
Vladimir Diaz
18844f6453
Initial refactor of developer tool
2016-04-05 20:23:37 -04:00
Vladimir Diaz
90d0d5c49a
Fix remaining updater.py test failures
2016-04-05 20:12:31 -04:00
Vladimir Diaz
b0c86cacb4
Remove test condition for tuf.ForbiddenTargetError exception (has been removed)
2016-03-31 17:29:38 -04:00
Vladimir Diaz
efc01f0007
Remove obsolete functions tested in test_roledb.py
2016-03-31 17:24:57 -04:00
Vladimir Diaz
09f6261b4a
Specify correct number of arguments for modified _visit_child_role()
2016-03-31 13:26:06 -04:00
Vladimir Diaz
f162b4b7e8
Update test_roledb following the changes to remove_delegated_roles()
2016-03-30 17:24:11 -04:00
Vladimir Diaz
aaf755e381
Delete remove_delegated_roles() and modify affected lines (including add_role())
...
We shouldn't remove delegated roles if the repository can resemble a graph of delegations, since the delegations of one role are independent of another
2016-03-30 16:43:51 -04:00
Vladimir Diaz
c20c83b3ff
Remove parent 'targets' directory from role1.json paths
2016-03-29 15:35:20 -04:00
Vladimir Diaz
9536cacdee
Fix bug where the snapshot and timestamp roles are listed in snapshot.json
2016-03-29 15:28:18 -04:00
Vladimir Diaz
28e738ed8c
Repository data that contains the correct number of delegated roles in snapshot.json
2016-03-28 17:51:43 -04:00
Vladimir Diaz
51adc771a0
More bug fixes
...
When loading roles from disk, ensure these roles are not marked as dirty. Add a boolean to relevant functions to provide the option to update the roledb without marking roles as dirty
2016-03-28 17:49:56 -04:00
Vladimir Diaz
f47cdb04d2
Remove 'targets' directory from path in 'test_extraneous_dependencies_attack.py
...
and fixes in repository_tool.py
2016-03-28 16:30:35 -04:00
Vladimir Diaz
8ccdff540f
Convert list of dirty roles to set to avoid duplicates
2016-03-28 16:25:49 -04:00
Vladimir Diaz
283c62abe0
More unit test fixes
...
A delegated rolename is no longer required to start with 'targets'
2016-03-25 11:59:11 -04:00
Vladimir Diaz
9c0064e39d
Fix remaining issues with add_target_to_bin() and remove_target_from_bin()
2016-03-24 13:55:44 -04:00
Vladimir Diaz
251bbaa93c
Remove full name for hashed bin delegation, update comment, and remove outdated test condition
2016-03-24 13:16:43 -04:00
Vladimir Diaz
b982c063db
Latest WIP
2016-03-22 11:26:55 -04:00
Vladimir Diaz
b4626f172a
Merge branch 'develop' of github.com:theupdateframework/tuf into remaining-1.0-tasks
2016-03-17 12:23:51 -04:00
Vladimir Diaz
dd8a7eb0dd
Review test_indefinite_freeze_attack.py and updater.py. Minor edits made
2016-03-17 11:36:11 -04:00
Sebastien Awwad
1ee1f92a4d
added clarifying comments to repo and key loading
2016-03-16 14:27:40 -04:00
Sebastien Awwad
4d8732bee8
removing unnecessary loading of root keys in test
2016-03-16 14:23:58 -04:00
Sebastien Awwad
9137986301
Removing superstitious 0.1s sleeps.
2016-03-16 14:14:26 -04:00
Sebastien Awwad
893911614a
fixing minor comment wording
2016-03-16 11:54:18 -04:00
Sebastien Awwad
85a7502603
- Tweaked the sleep durations to be more minimal, based on time that had passed. (updater.refresh() can take a while.)
...
- Put code back into working state after some failure mode debugging of a separate bug by Vlad and me.
- Expanded some comments, added explanations, and made a few others more readable.
- Removed an unnecessary path recalculation and an unnecessary sleep.
2016-03-16 11:50:11 -04:00
Sebastien Awwad
ab4cbdde52
guaranteed test failure: unprintable on 3, printable on 2
2016-03-14 18:08:24 -04:00
Sebastien Awwad
fee25a44cd
sharing bug with Vlad
2016-03-14 17:39:04 -04:00
Sebastien Awwad
8250223207
removed unnecessary temp variable reload line; switched names of Test 1 and Test 2
2016-03-14 16:30:12 -04:00
Sebastien Awwad
08e005330a
Minor log message improvements.
2016-03-14 15:51:58 -04:00
Sebastien Awwad
6a4982fa8a
Improving comments in test_indefinite_freeze_attack
2016-03-14 12:59:46 -04:00
Sebastien Awwad
0fa4518929
comment improvement in indefinite freeze attack test
2016-03-11 17:01:35 -05:00
Sebastien Awwad
66f56271d2
This is a manual squash commit of detect_expiry_322, to avoid merge conflicts.
...
Comment lines from the individual commits include:
1. Fix #322 by detecting expiry of stale files. initial attempt
2. temp commit of files from Soma
3. removing freeze_attack_stale_expiry and leaving the test added to indefinite freeze attack
4. fixing indefinite freeze attack test: now incorporates old reject-freshly-downloaded-but-expired-timestamp test as well as reject-stale-already-present-but-expired-snapshot test
5. small refinements to indefinite freeze attack test
6. Pulled the recursion out of the except block in refresh() to avoid unprintable nested exceptions.
7. Added comments to the last commit (retry_once)
8. Merge pull request #1 from awwad/detect_expiry_322_temp (removing cruft in another branch)
2016-03-10 15:01:12 -05:00
Vladimir Diaz
a111661a72
Fix roledb.get_delegated_roles() and test cases in test_repository_tool.py
2016-03-02 13:08:46 -05:00
Vladimir Diaz
6611efbf09
Add the new delegation structure to repository_data
2016-03-02 12:03:39 -05:00
Vladimir Diaz
c6ffcf0d83
Update the unit tests for _versioninfo_has_been_updated() (to use the renamed function)
2016-02-26 13:35:37 -05:00
Vladimir Diaz
55f1a5bad3
Merge branch 'develop' of github.com:theupdateframework/tuf into 1.0-review
2016-01-27 17:11:16 -05:00
Vladimir Diaz
f38d99ab27
Add the new path to the SSL certificate used for testing
2016-01-27 16:35:23 -05:00
Vladimir Diaz
5ce17a3945
Add the newly-generated SSL cert and key to simple_https_server.py
2016-01-27 16:32:59 -05:00
Vladimir Diaz
dfbdc5aaea
Add SSL certificate and key used to test https connections
2016-01-27 16:31:33 -05:00
Vladimir Diaz
1f06c656ea
Remove certificates used to test https connections
2016-01-27 16:30:52 -05:00
Vladimir Diaz
50a65e56ba
Merge branch 'develop' of github.com:theupdateframework/tuf into test_https_connection
2016-01-26 15:26:45 -05:00
Vladimir Diaz
b50960a056
Update the test case for create_rsa_signature()
...
Verify that ValueError is now raised
2016-01-25 11:42:15 -05:00
Vladimir Diaz
284e8008a4
Fix comment for generate_rsa_public_and_private test case
...
The incorrect comment was previously written for PyCrypto. Also remove a call to generate_rsa_public_and_private(2050) that is actually valid under pyca/cryptography
2016-01-21 16:57:42 -05:00
Vladimir Diaz
ddec8ab44a
Update aggregate_tests.py
...
Decrease the verbosity of the test runner so that only test failures are shown.
2016-01-21 13:25:58 -05:00
Vladimir Diaz
c45ce4f060
Merge branch 'develop' of https://github.com/theupdateframework/tuf into test_https_connection
2016-01-21 11:12:22 -05:00
Vladimir Diaz
25ba4001c2
Merge branch 'develop' of https://github.com/theupdateframework/tuf into develop
2016-01-20 10:52:26 -05:00
Vladimir Diaz
cb687b4c2f
Import tuf.log in test_init and fix logger name. Issue #303 .
...
In PR #307 , tuf.log is no longer imported by __init__.py. Add an import statement for tuf.log to fix missing handler warning in 'test_init.py. The logger name specified is also incorrect.
2016-01-20 10:29:58 -05:00
Vladimir Diaz
47cae502fa
Allow users to specify the path (via conf.py) to save log files
2016-01-14 17:25:08 -05:00
David Halls
c859eeb258
Address code review comments
2016-01-13 23:02:17 +00:00
Vladimir Diaz
b5f7a1aa8d
Review test_updater.py
2015-10-28 14:26:49 -04:00
Vladimir Diaz
fab23480b3
Review 'test_repository_lib.py'
2015-10-28 11:45:01 -04:00
Vladimir Diaz
7bf14b3bc4
Review 'test_replay_attack'
2015-10-27 17:24:57 -04:00
Vladimir Diaz
2541276320
Review 'test_mix_and_match_attack.py
2015-10-27 17:22:14 -04:00
Vladimir Diaz
25d98780fb
Review 'test_extraneous_dependencies_attack.py'
2015-10-27 17:15:46 -04:00
Vladimir Diaz
0912495b2b
Review 'test_formats.py'
2015-10-27 16:55:51 -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
14ca0d1565
Update the repository test data following the addition of the 'compression algorithms' key in root.json
2015-10-20 09:14:21 -04:00
Vladimir Diaz
d993ccf35e
Generate a repository for the unit tests that contains the changes to the snapshot role
2015-10-15 09:53:54 -04:00
Vladimir Diaz
7bbdd87117
Update the unit test for updater.py after implementing versioninfo
2015-10-15 09:52:14 -04:00
Vladimir Diaz
3fc1e59000
Initial implementation of stored version numbers in snapshot.json
2015-09-22 07:31:30 -04:00
Vladimir Diaz
e9b2271e6d
Check the format of 'data' arguments in pycrypto_keys.py
2015-08-31 15:33:51 -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
bc0ba6b8d8
Add whitespace for readability
2015-08-26 17:31:21 -04:00
Vladimir Diaz
116f3b335b
Remove incorrectly loaded 'snapshot' key in test case
2015-08-26 11:09:30 -04:00
Vladimir Diaz
97d6f5edb8
Remove status() checks used during debugging
2015-08-26 11:08:18 -04:00
Vladimir Diaz
6cbebc0606
Temporarily disable check for non-string arguments to the rsa signature methods
...
TODO: Modify these functions to check for non-string arguments.
2015-08-26 11:07:30 -04:00
Vladimir Diaz
115b2d2bce
Ensure the PSS defaults used by PyCrypto match those set with pyca/cryptography's
2015-08-05 14:51:27 -04:00
Vladimir Diaz
b2132e3c72
Support enryption + decryption with pyca/cryptography
2015-07-30 10:19:44 -04:00
Vladimir Diaz
af85746713
Support for pyca/cryptography
2015-07-21 10:16:20 -04:00
Vladimir Diaz
7a07179279
Fix shebang statment in unit test module
2015-06-02 10:31:03 -04:00
Vladimir Diaz
47471db40f
Add import statements for unvendored dependencies in the unit tests
2015-06-02 10:28:02 -04:00
Vladimir Diaz
1c8f41b0c0
Update import statements of unvendored dependencies
2015-06-02 08:29:22 -04:00
Vladimir Diaz
6b0d060c48
Update test_util.py
...
Remove print statements.
2015-05-04 23:52:20 -04:00
Vladimir Diaz
2f49561aa4
Protect against timing attacks when comparing digests
...
Thank you Marcin W. for spotting this.
2015-05-04 23:07:52 -04:00
Vladimir Diaz
16685d2ff3
Add configuration option for supported URI schemes
...
Support only 'http' and 'https' by default. Thanks Marcin W.
2015-05-04 15:34:22 -04:00
Vladimir Diaz
d9e3ce4ce1
Expand comment for incomplete test case (testing consistent snapshots) in test_updater.py
2015-04-27 20:25:52 -04:00
Vladimir Diaz
c97d9a022d
Force build failure if any of the unit tests fail
2015-04-27 18:32:09 -04:00
Vladimir Diaz
230920f74e
Minor code coverage improvement to updater.py
2015-04-27 18:30:55 -04:00
Vladimir Diaz
98df2014b6
Fix minors issues with strings and remove print statements
2015-04-06 21:29:21 -04:00
Vladimir Diaz
110c8a196b
Improve code coverage for updater.py
2015-04-06 20:05:41 -04:00
Vladimir Diaz
75eb79534c
Improve code coverage for repository_lib.py
2015-04-03 13:46:43 -04:00
Vladimir Diaz
3293745d05
Improve code coverage for repository_tool.py
2015-04-02 16:38:18 -04:00
Vladimir Diaz
003847e73f
Improve code coverage for download.py
2015-04-02 16:37:47 -04:00
Vladimir Diaz
23083fae12
Improve code coverage for repository_lib.py
2015-04-02 16:37:11 -04:00
Vladimir Diaz
55e9e952b6
Improve code coverage for pycrypto_keys.py
2015-04-02 16:35:45 -04:00
Vladimir Diaz
f6b5927238
Improve code coverage for util.py
2015-04-02 16:34:52 -04:00
Vladimir Diaz
afd8bfd390
Improve code coverage for log.py
2015-04-02 16:33:39 -04:00
Vladimir Diaz
7e8cd6a56d
Add test module for tuf exceptions
2015-04-02 16:33:06 -04:00
Vladimir Diaz
3eb8f10710
More coverage improvements
2015-03-02 15:10:27 -05:00
Vladimir Diaz
b7cf7e6588
Improve each module's code coverage to at least 90%
...
Update unit tests for download.py, repository_lib.py, repository_tool.py, and updater.py.
Re-generate repository data so that compressed metadata may be tested.
2015-02-11 13:22:46 -05:00
Vladimir Diaz
fc80976fc4
Remove extraneous closing parenthesis
2015-02-06 14:51:57 -05:00
Vladimir Diaz
623820c6ac
Cosmetic edits to test_interpose_updater.py
2015-02-05 15:24:43 -05:00
Vladimir Diaz
90a283d589
Add initial Python 2+3 compatibility
2015-02-04 17:45:24 -05:00
Vladimir Diaz
4c4286cc63
Merge branch 'develop' of https://github.com/Pankh/tuf into Pankh-develop
2014-12-15 12:54:33 -05:00
Pankh
f6e0fecf07
Add header to test_interpose_updater
2014-10-22 14:44:31 -04:00
Pankh
b843684aee
To merge the updates of Master branch
2014-09-29 14:45:24 -04:00
Pankh
7f64aad061
Test cases for tuf.interposition.updater with 98% coverage
2014-09-29 14:34:11 -04:00
Vladimir Diaz
3c9b1d0068
Add missed test coverage for updater.py's init().
...
Add test condition for missing previous directory in init().
2014-09-02 14:46:36 -04:00
Vladimir Diaz
419b1ca85e
Log debug message for roles that are skipped in util.find_delegated_role().
2014-08-20 12:27:06 -04:00
Vladimir Diaz
30f551131f
Update test_keys.py
...
Strip PEM footer and reorder PEM header / footer test conditions.
2014-07-19 08:52:57 -04:00
vladdd
3fd6839c2b
Add test case for keys.formats_rsakey_from_pem()
...
Add test_formats_rsakey_from_pem() test case and test conditions for improperly formatted PEM.
Add test condition to verify trailing whitespace is removed and matches the expected PEM format generated
internally. Public PEMs generated externally (with the expected trailing newline) was not previously considered.
2014-07-18 15:24:10 -04:00
vladdd
20d5a6b3e4
Fix self.assertTrue() conditions in test_updater.py
...
A few test conditions in test_updater.py incorrectly used self.assertTrue() instead of self.assertEqual().
Fix updater.remove_obsolete_targets(), where targets in the destination directory were not being removed because target paths were treated as absolute paths by os.path.join().
2014-07-06 22:25:20 -04:00
Vladimir Diaz
aefb0172cf
Merge pull request #233 from vladimir-v-diaz/meskio-filepath
...
Review and Update Pull Request #232
2014-07-04 18:09:44 -04:00
vladdd
9cf9a6a8b5
Review and update Pull Request #232 .
...
Fix test conditions for updated_targets(), which incorrectly verified the expected number of updated targets with assertTrue().
Update comment for PR fix to clarify os.path.join() behavior and the expected file paths.
2014-07-04 17:50:22 -04:00
Vladimir Diaz
1985c450c9
Merge custom info changes, logger messages, and minor edits.
2014-07-02 11:10:50 -04:00
Vladimir Diaz
59b45fdfe5
Merge branch 'SantiagoTorres-developer-tools' of https://github.com/vladimir-v-diaz/tuf into develop
2014-07-01 07:47:47 -04:00
vladdd
2f520dd140
Review and update pull request #188 .
2014-06-30 14:04:01 -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
Vladimir Diaz
5d766d3d6f
Review and update docstrings and README.
2014-06-25 09:45:55 -04:00
Vladimir Diaz
528e33dd77
Add test condition for custom data in test_updater.py.
...
The updater client may reference target information (including 'custom') by accessing the dictionary returned by updater.py.
Example:
target = updater.target('LICENSE.txt')
target['filepath']
target['fileinfo']['length']
target['fileinfo']['hashes']
target['fileinfo']['custom']
2014-06-24 10:31:05 -04:00
Vladimir Diaz
337c9f9ffc
Regenerate '/tests/repository_data/' to include example of custom data.
2014-06-24 10:17:14 -04:00
Vladimir Diaz
f6a9b7fc58
Verify that generated Targets metadata can contain custom data.
2014-06-24 09:38:47 -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
Santiago Torres
26eb5b7e35
Added relative filepath support and increased coverage
...
After seeing the coveralls report I realized the projects were not
relocatable. While this might be convenient for some uses, moving a
project from one place to another might not be optimal. This has been
changed now.
The only place where absolute filepaths are handled now is with flat
project layouts. However, it is possible to overwrite this filepath if
the targets folder is to be changed.
2014-06-21 19:07:34 -04:00
Santiago Torres
f9ce4fcb36
Added the test_developer_tool module
...
All of the neccessary test cases for the developer tool
2014-06-20 19:39:11 -04:00
Santiago Torres
07e8ef0be7
Added the generate_repository_data.py script and its produce
...
The generate_repository_data script works in the exact same way as the
generate script and it generates a fresh batch of pre-signed metadata to
test the load_project function.
2014-06-20 19:36:42 -04:00
Vladimir Diaz
c0a61e14e0
Add test coverage for repository_lib._log_status_of_top_level_roles().
...
Verify that status() does not raise 'tuf.InsufficientKeysError' nor 'tuf.UnsignedMetadataError'.
2014-06-19 11:24:07 -04:00
Vladimir Diaz
b105c7853c
Add test condition for repository_lib.create_tuf_client_directory().
...
Verify that non-OSError.EEXist exceptions are re-raised.
2014-06-19 09:50:20 -04:00
Vladimir Diaz
882871ccfc
Add missing test case for remove_target_from_bin().
2014-06-18 12:39:39 -04:00
Vladimir Diaz
49a3a4990b
Fix comment / typo in unsafe_download() test condition
2014-06-18 09:06:49 -04:00
Vladimir Diaz
a57c97749a
Fix test_download.py comments for the test case dealing with incorrect file lengths.
2014-06-17 13:45:42 -04:00
Vladimir Diaz
6dafddc10f
Add test case for https connection.
2014-06-17 10:28:56 -04:00
Vladimir Diaz
9d087389a9
Add the simple https server module.
2014-06-17 10:25:16 -04:00
Vladimir Diaz
e83045f162
Add self-signed certificates to be used by simple_https_server.py
2014-06-17 10:20:57 -04:00
vladdd
f0ac659110
Move optparse import statement.
...
Organize import statements of standard Python and TUF modules into separate blocks.
2014-06-16 13:11:35 -04:00
Santiago Torres
5a097faaf8
Added switches to the generate script
...
Added two switches to the generate script:
-k (or --keys), which forces the creation of new keys.
-d (or --dry-run), which skips the actual writing or copying phases
The second option might be useful in the future, and helped me debug the
optparse module, so I left it there.
2014-06-13 15:33:07 -04:00
Vladimir Diaz
e4c98d38ba
Add missing test cases for download.py and and updater.py.
2014-06-12 09:33:12 -04:00
Vladimir Diaz
0c6b360952
Add missing test conditions for test_repository_lib.py and minor edits to modules.
2014-06-11 11:29:00 -04:00
Vladimir Diaz
74c0120ed4
Increase sleep time after starting simple server in integration tests.
2014-06-10 09:26:09 -04:00
vladdd
9e0392bb80
Add missing test coverage for pycrypto_keys.py.
2014-06-08 22:16:43 -04:00
vladdd
744be00cbc
Initial implementation of authoritative delegations.
2014-06-07 20:29:18 -04:00
vladdd
19c69487b0
Merge branch 'develop' of https://github.com/vladimir-v-diaz/tuf into develop
2014-06-06 18:57:32 -04:00
vladdd
17b230abdd
Support Python 2.6.
2014-06-06 18:57:23 -04:00
Vladimir Diaz
1c1cd0f192
Update / fix remaining Python 2 + 3 doctests.
...
Remove test_slow_retrieval_attack.py print statements.
2014-06-06 08:37:31 -04:00
Vladimir Diaz
0e9a1de4b1
Merge branch 'develop' of https://github.com/vladimir-v-diaz/tuf into develop
2014-06-06 07:33:11 -04:00