-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor signature code #5
Commits on Apr 14, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 6eeb452 - Browse repository at this point
Copy the full SHA 6eeb452View commit details -
Strip all encoding nonsense out of tuf.keys (which is low level)
tuf.keys.create_signature and tuf.keys.verify_signature should have no awareness of the encodings of the data fed to them. They should receive bytes, sign those or validate the signatures on those, and return signatures or validity booleans. They shouldn't need to deal with ASN.1 or DER or JSON or even encoding things as utf-8. Future commits will capture those needs in higher level code.
Configuration menu - View commit details
-
Copy full SHA for c0c7031 - Browse repository at this point
Copy the full SHA c0c7031View commit details -
Refactor signature-related code, part 2
Allow code to expect tuf.keys.create_signature to take bytes without lots of special flags.
Configuration menu - View commit details
-
Copy full SHA for f709bc1 - Browse repository at this point
Copy the full SHA f709bc1View commit details -
Refactor sig-related part3: Add high-level signature functions
that will deal with metadata encoding to sig.py. These can be called from code that would previously have had to worry about ASN.1/DER/JSON/utf-8.
Configuration menu - View commit details
-
Copy full SHA for a099872 - Browse repository at this point
Copy the full SHA a099872View commit details -
Refactor sig-related part4: Use the new functions
repository_lib functions and sig.get_signature_status can now forget all about encoding and format and use the new functions in sig.
Configuration menu - View commit details
-
Copy full SHA for 6e4a2a6 - Browse repository at this point
Copy the full SHA 6e4a2a6View commit details
Commits on Apr 18, 2017
-
Check for binary data in signature-related call arguments
create_signature and verify_signature only take binary data as their 'data' argument, so this commit checks that argument for the correct format.
Configuration menu - View commit details
-
Copy full SHA for 0869436 - Browse repository at this point
Copy the full SHA 0869436View commit details -
Fix and add to test_keys, ensuring right error raised if bad data
Non-binary data must raise tuf.FormatError when provided to create_signature or verify_signature. Also fixes test_keys tests for new expectations: binary only.
Configuration menu - View commit details
-
Copy full SHA for c0ac9a9 - Browse repository at this point
Copy the full SHA c0ac9a9View commit details -
DOC: Improve docstrings for new functions in tuf.sig
sign_over_metadata and verify_signature_over_metadata
Configuration menu - View commit details
-
Copy full SHA for 573a6ae - Browse repository at this point
Copy the full SHA 573a6aeView commit details -
Fix testing for tuf.sig after tuf.keys changes
and have testing use the new sign_over_metadata function. (Testing will already use the other new function, verify_signature_over_metadata, because it is called indirectly by tuf.sig.verify.) tuf.keys only deals with binary data now.
Configuration menu - View commit details
-
Copy full SHA for 34b6dcc - Browse repository at this point
Copy the full SHA 34b6dccView commit details -
Configuration menu - View commit details
-
Copy full SHA for be2b8e5 - Browse repository at this point
Copy the full SHA be2b8e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2805840 - Browse repository at this point
Copy the full SHA 2805840View commit details