Ran
|
Files
35
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
<a href="https://github.com/in-toto/in-toto/commit/<a class=hub.com/in-toto/in-toto/commit/7c8f3f13b854f152302df989d578f911adab96d9">7c8f3f13b<a href="https://github.com/in-toto/in-toto/commit/7c8f3f13b854f152302df989d578f911adab96d9">">In-toto-sign (#99) * Replaces XXX macros with FIXME/TODO * Adds PKI functions to toto.utils This commit finally throws away the throw-away-function &#39;create_and_persist_or_load_key&#39; and replaces it with &#39;generate_and_write_rsa_keypair&#39; and &#39;import_rsa_key_from_file&#39; plus wrappers that additionally prompt for passwords toto-verify and toto-run are adapted to load keys for signing and verification using these functions * Split public and private key file contexts * Makes RSA password optional RSA private keys can now be created and loaded without password. Utils figures out whether a password is required when a key is loaded and only then shows a prompt to the user. This required some changes to the ssl_crypto submodule </a><a class="double-link" href="https://github.com/in-toto/in-toto/commit/<a class="double-link" href="https://github.com/in-toto/in-toto/commit/554af0816b4d23eb0e2f8d1bbdabf84372fa3890">554af0816</a>">554af0816</a><a href="https://github.com/in-toto/in-toto/commit/7c8f3f13b854f152302df989d578f911adab96d9"> * First commit, having code of inspect_sign, Will add comments etc in the coming ones * Another merge conflict resolution * Added documentation * Fixed merge conflicts yet again :'D * Fixed notations, used argparser's choice method,fixed indentation * Added link import in verify_sign function * Removed two unnecessary functions, renamed existing functions, now the helper functions return an object, which is then acted upon as per the user arguments, for example: -i : adds the signature, while dumping infixes the key in the file name; -i -r : adds the signature, replaces all the old signatures, dumps with the above mentioned file name; -r : replaces all the old signatures with the new one, doesn't adds keyid in the file name while dumping, no args - adds the signature to the existing set of signatures, dumps but doesn't adds the keyid while dumping * Added documentation to the main function * Added File Header Documentation * Added action='store_true' in the optional arguments -r (replace all) and -i (infix keyID in the file name) * Fixed minor documentation issues * remove in_toto_sign.py from in-toto directory, and moved it to in-toto/in_toto * Minor fixes in the documentation, indentation, Used signable object's sign method for signing Changed the key import to take into account the case when the key is encrypted. Changed the formatting. Changed some function names. * Fixed documentation Remove unnecessary comments * Added test_in_toto_sign.py . Edited setup.py First draft, changes(Additions, deletions etc) to follow * Missed , in setup.py * Changed directory of test_in_toto_sign.py to test/test_in_toto_sign.py * Updated test_in_toto_sign_verify_sign function * Fixed indentation error, the reason why Travis build was failing * Changed import names * Added imports * Fixed some errors * Changed key imports * Added log import in in_toto_sign * Imported alice's key from file * Fixed calling of replace-sig, changed function's name to replace_sign * Same change reflected in the whole file * Added assertRaises(exceptions.SignatureVerificationError) in the function which verifies the signature Added missing log in log.logging.getLogger() * Added self.assertRaises clause in function test_main_required_args * Added self.assertRaises(SystemExit) in verbose checking * Fixed documentation issues * Fixed indentation issues * Minor fixes in indentation * Fixed typo in import_rsa_key_from_file * Removed blank spaces, added comments. Code was over indented in some places, set it right. * Added multiple key handling functionality * Added some code, which was deleted by mistake * Changed the parameters, edited the tests accordingly * Missed some code * Added functions: 1) file_type() : given a file path, it returns 0, if the file is a layout file, returns 1, if it is a link file 2) check_file_type_and_return_object(): given a file path, returns either a link object or a layout object depending upon the file type 3) Added an argument : --d (--destination) which lets the user specify the output file name * Removed code used for debugging, removed redundant self.assertRaises() * Removed file_type() function, now checking file type by using signable_object._type * Removed file_type function, now checking file type by using signable_object._type * Added functionality which dumps when no key infix is specified * Removed redundant code, refactored some parts of the code, added a new parameter found in the functon *function - check_file_type_and_return_object() * Major changes in code of main function, as suggested by lukas- it now works accordingly and handles all the situations changed check_file_type_and_return_object() function * Updated the unit tests, removed blank space in in_toto_sign.py * Typo in test_main_wrong_key_Exits * Added more tests * Missed self while defining a path to a link file * Added more tests * And more and more tests, edited code of in-toto-sign * Minor typo * And more tests * Edit more tests * Added test for invalid signature verification * Added different dump files * Added more tests, when infix and destination both are specified * Added main's failing verification test * Refactored the code * Added documentation, removed redundant code * Edited some tests, minor changed in in_toto_sign.py too * Fixed an error due to unimported key * Simplified the code further
2701 of 2720 relevant lines covered (99.3%)
0.99 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|