Skip to content
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

Merged
merged 11 commits into from
Apr 24, 2017
Merged

Refactor signature code #5

merged 11 commits into from
Apr 24, 2017

Commits on Apr 14, 2017

  1. Configuration menu
    Copy the full SHA
    6eeb452 View commit details
    Browse the repository at this point in the history
  2. 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.
    awwad committed Apr 14, 2017
    Configuration menu
    Copy the full SHA
    c0c7031 View commit details
    Browse the repository at this point in the history
  3. Refactor signature-related code, part 2

    Allow code to expect tuf.keys.create_signature to take bytes without
    lots of special flags.
    awwad committed Apr 14, 2017
    Configuration menu
    Copy the full SHA
    f709bc1 View commit details
    Browse the repository at this point in the history
  4. 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.
    awwad committed Apr 14, 2017
    Configuration menu
    Copy the full SHA
    a099872 View commit details
    Browse the repository at this point in the history
  5. 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.
    awwad committed Apr 14, 2017
    Configuration menu
    Copy the full SHA
    6e4a2a6 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2017

  1. 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.
    awwad committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    0869436 View commit details
    Browse the repository at this point in the history
  2. 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.
    awwad committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    c0ac9a9 View commit details
    Browse the repository at this point in the history
  3. DOC: Improve docstrings for new functions in tuf.sig

    sign_over_metadata and verify_signature_over_metadata
    awwad committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    573a6ae View commit details
    Browse the repository at this point in the history
  4. 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.
    awwad committed Apr 18, 2017
    Configuration menu
    Copy the full SHA
    34b6dcc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    be2b8e5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2805840 View commit details
    Browse the repository at this point in the history