Skip to content

Commit

Permalink
Add new Client constructors
Browse files Browse the repository at this point in the history
This patch changes how Clients are created. It adds the following
functions:

* `Client::from_local` - use the specified root version from the local
  repository as our initial trusted root.
* `Client::from_pinned_root_keyids` - use the specified root version,
  threshold, and keyids to trust a root fetched from the local or remote
  repository.
* `Client::from_pinned_root_keys` - use the specified root version,
  threshold, and public keys to trust a root fetched from the local or
  remote repository.
* `Client::from_pinned_root` - use the specified root metadata as the
  initial trusted root.

This deprecates the old constructors:

* `Client::new`
* `Client::with_root_pinned`

Closes: theupdateframework#229
  • Loading branch information
erickt committed Dec 3, 2019
1 parent 540ac44 commit 3a464de
Show file tree
Hide file tree
Showing 7 changed files with 566 additions and 68 deletions.
Loading

0 comments on commit 3a464de

Please sign in to comment.