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

Allow Initialize/NewFromEnv to reinitialize metadata if timestamp expired #893

Merged
merged 3 commits into from
Jan 17, 2023

Commits on Jan 13, 2023

  1. Update initializeTUF to fetch new metadata when timestamp expires

    This changes the singleton to only initialize the client once, but on
    every invocation, check if the timestamp is expired.
    
    I wrapped all of this in a mutex to prevent concurrent updates (I'm not
    sure if this would be safe, I assume the TUF object is not thread-safe).
    
    Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
    haydentherapper committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    50c8aa4 View commit details
    Browse the repository at this point in the history
  2. Add concurrent test

    Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
    haydentherapper committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    965717d View commit details
    Browse the repository at this point in the history
  3. Use singleton error

    Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
    haydentherapper committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    b9685d5 View commit details
    Browse the repository at this point in the history