pw_software_update: CLI reference#
pw_software_update: Secure software delivery
Overview#
Use the pw_software_update
CLI to quickly learn and prototype a software
update system on your development PC before productionizing one. In the future
you will be able to use the CLI to update a reference
target.
~$ cd pigweed
~/pigweed$ source ./activate.sh
~/pigweed$ pw update [-h] <command>
Command |
Description |
---|---|
|
generates a local signing key |
|
creates a TUF root metadata file |
|
signs a TUF root metadata |
|
prints a TUF root metadata |
|
creates an empty update bundle |
|
adds a root metadata to an existing bundle |
|
adds a target file to an existing bundle |
|
signs an update bundle |
|
prints an update bundle |
|
verifies an update bundle |
generate-key#
Generates an ECDSA SHA-256 public + private keypair.
$ pw update generate-key [-h] pathname
Argument |
Description |
---|---|
|
output pathname for the new key pair |
create-root-metadata#
Creates a root metadata.
$ pw update create-root-metadata [-h]
[--version VERSION] \
--append-root-key ROOT_KEY \
--append-targets-key TARGETS_KEY \
-o/--out OUT
Option |
Description |
---|---|
|
path to root key (public) |
|
path to targets key (public) |
|
output path of newly created root metadata |
|
anti-rollback version number of the root metadata (defaults to 1) |
sign-root-metadata#
Signs a given root metadata.
$ pw update sign-root-metadata [-h] \
--root-metadata ROOT_METADATA \
--root-key ROOT_KEY
Option |
Description |
---|---|
|
Path of root metadata to be signed |
|
Path to root signing key (private) |
inspect-root-metadata#
Prints the contents of a given root metadata.
$ pw update inspect-root-metadata [-h] pathname
Argument |
Description |
---|---|
|
Path to root metadata |
create-empty-bundle#
Creates an empty update bundle.
$ pw update create-empty-bundle [-h] \
[--target-metadata-version VERSION] \
pathname
Argument |
Description |
---|---|
|
Path to newly created empty bundle |
Option |
Description |
---|---|
|
Version number for targets metadata, defaults to 1 |
add-root-metadata-to-bundle#
Adds a root metadata to a bundle.
$ pw update add-root-metadata-to-bundle [-h] \
--append-root-metadata ROOT_METADATA \
--bundle BUNDLE
Option |
Description |
---|---|
|
Path to root metadata |
|
Pathname of the bundle |
add-file-to-bundle#
Adds a target file to an existing bundle.
$ pw update add-file-to-bundle [-h] \
[--new-name NEW_NAME] \
--bundle BUNDLE \
--file FILE_PATH
Option |
Description |
---|---|
|
Path to a target file |
|
Pathname of the bundle |
|
Optional new name for target |
sign-bundle#
Signs an existing bundle with a dev key.
$ pw update sign-bundle [-h] --bundle BUNDLE --key KEY
Option |
Description |
---|---|
|
The targets signing key (private) |
|
Pathname of the bundle |
inspect-bundle#
Prints the contents of a given bundle.
$ pw update inspect-bundle [-h] pathname
Argument |
Description |
---|---|
|
Pathname of the bundle |
verify-bundle#
Performs verification of an existing bundle.
$ pw update verify-bundle [-h] \
--bundle BUNDLE
--trusted-root-metadata ROOT_METADATA
Option |
Description |
---|---|
|
Trusted root metadata(anchor) |
|
Pathname of the bundle to be verified |