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

Handle HTTP redirects using reqwest Client builder #29

Merged
merged 5 commits into from
Nov 29, 2023

Commits on Nov 29, 2023

  1. Handle HTTP redirects using reqwest Client builder

    To be able to handle HTTP redirects, we need to create reqwest Client
    with its Client builder, which defaults to 10 attempts on redirects.
    Then it is not necessary to do anything again after receiving HTTP
    response.
    dongsupark committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    396c64d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b9c3c46 View commit details
    Browse the repository at this point in the history
  3. download_sysext: split out hash_on_disk_sha256 into download

    To expose hash_on_disk core logic to other parts like test/update_crau
    or download_sysext, move that into a common part in src/download.rs.
    dongsupark committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    9470586 View commit details
    Browse the repository at this point in the history
  4. test: make crau_verify depend on download::hash_on_disk_sha256.

    Adjust test/crau_verify to make it depend on the new library function
    download::hash_on_disk_sha256.
    dongsupark committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    46214ca View commit details
    Browse the repository at this point in the history
  5. add new option to fetch data from remote URL into string

    Add new option --payload-url to fetch data from the given URL into
    String. Only one of both --input-xml and --payload-url should be given,
    otherwil fail.
    
    Construct a fake package to verify signatures in case of a directly
    downloaded update payload file. Split the existing signature
    verification part into do_download_verify, for the fake pacakage
    code path to rely on the common download and verify part.
    dongsupark committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    5f6bcdf View commit details
    Browse the repository at this point in the history