You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR expands the CLI with new commands for managing integrity blocks.
CLI Improvements:
Updated the wbn-sign CLI with a new command-based interface (sign, add-signature, remove-signature, replace-signature, and info), see README for more info.
Added colored console output for better readability using the colors package.
This is a continuation of #913, which was split into API(original PR) and CLI(this PR) parts.
---------
Co-authored-by: Zgroza (Luke) Klimek <zgroza@google.com>
Signs the given web bundle with private key(s). Produces signed web bundle output file.
144
-
145
-
Arguments:
146
-
web_bundle a web bundle (file `*.wbn`) to sign
147
-
private_keys private keys (files `*.pem`) with which the web bundle will be signed. EcdsaP256 and ed25519 keys (encrypted and not encrypted) are supported.
148
-
149
-
Options:
150
-
-o, --output <file> signed web bundle output file (default: "signed.swbn")
151
-
--web-bundle-id <web-bundle-id> web bundle ID. Derived from the first key if not specified.
152
-
-h, --help display help for command
153
-
```
136
+
#### Commands:
154
137
155
-
For more details check `wbn-sign help [command]`.
138
+
-`sign <web_bundle> <private_keys...>`: Signs a web bundle with one or more private keys.
139
+
-`add-signature <signed_web_bundle> <private_keys...>`: Adds new signatures to an already signed bundle.
140
+
-`remove-signature <signed_web_bundle> <keys...>`: Removes signatures from a bundle. Keys can be public (Base64/.pem) or private (.pem).
141
+
-`replace-signature <signed_web_bundle> <old_key> <new_private_key>`: Replaces an existing signature.
142
+
-`info <web_bundle>`: Displays information about the integrity block, including the Web Bundle ID and public keys of signers.
For better security, one should prefer using passphrase-encrypted ed25519
230
-
private keys. To encrypt an unencrypted private key, run:
198
+
**Note**: We recommend using Ed25519, as it is considered more secure than ECDSA P-256. Unlike ECDSA, which relies on a pseudo-random number generator and is vulnerable to entropy-related flaws, Ed25519 is deterministic and remains secure even if the system's random number generator is compromised.
0 commit comments