McCoy:CommandLine

From MozillaWiki
Jump to: navigation, search

McCoy should accept certain command line arguments to control its behaviour.

General Options

 -taskhelp <task> Outputs a list of tasks or the help for a single task

Task Execution

Certain tasks can be performed from the command line. When executed in this way no UI will be displayed.

 mccoy <task> <task-options>

Adding Update Keys

 mccoy install-key [-n <name> | -k <file>] [options] <install.rdf>

This will add the public key to the install manifest allowing applications to verify the security of updates signed by the same key. One of -n or -k must be given to select which key to add. If necessary -pass must be provided to access the key.

 -n -name <name>       The name of the key to add to the manifest.
 -k -key <file>        A PEM encoded private key to add to the manifest.
 -pass <password>      The password to access keys or to decrypt a key file
                       given by -k.
 -o -out <file>        select output file, otherwise overwrite the input file

Update Manifest Signing

 mccoy sign-update [-n <name> | -k <file>] [options] <update.rdf>

This will add an update signature to the specified update.rdf file. One of -n or -k must be given to select which key to use to sign the update. If necessary -pass must be provided to access the key.

 -n -name <name>       The name of the key to use for signing.
 -k -key <file>        A PEM encoded private key to use for signing.
 -pass <password>      The password to access keys or to decrypt a key file
                       given by -k.
 -id <id>              Only sign the updates for the extension with the
                       given id, otherwise will sign updates for all
                       extensions in the file.
 -o -out <file>        select output file, otherwise overwrite the input file

Hash Generation

 mccoy hash [options] <extension.xpi>
 -a -alg <alg>    Hash using the specified algorithm. If not specified will
                  use sha512

This will output the hash for the specified xpi file.