Commit c8bbe0d0 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

feat: improve keyprove and keyverify help texts

parent 73c60ced
......@@ -18,11 +18,14 @@ import (
)
var issuerKeyproveCmd = &cobra.Command{
Use: "keyprove [path]",
Short: "Generate proof of correct generation for an IRMA issuer keypair",
Long: `Generate proof of correct generation for an IRMA issuer keypair.
The keyprove command generates a proof that an issuer key was generated correctly. By default, it generates a proof for the newest private key in the PrivateKeys folder, and then stores the proof in the Proofs folder.`,
Use: "keyprove [<path>]",
Short: "Generate validity proof for an IRMA issuer keypair",
Long: `Generate validity proof for an IRMA issuer keypair.
The keyprove command generates a proof that an issuer private/public keypair was generated
correctly. By default, it acts on the newest keypair in the <path>/PrivateKeys and <path>/PublicKeys
folders, and then stores the proof in the <path>/Proofs folder. If not specified, <path> is taken to
be the current working directory.`,
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
flags := cmd.Flags()
......@@ -137,10 +140,10 @@ The keyprove command generates a proof that an issuer key was generated correctl
func init() {
issuerCmd.AddCommand(issuerKeyproveCmd)
issuerKeyproveCmd.Flags().StringP("privatekey", "s", "", `File to get private key from (default "PrivateKeys/$counter.xml")`)
issuerKeyproveCmd.Flags().StringP("publickey", "p", "", `File to get public key from (default "PublicKeys/$counter.xml")`)
issuerKeyproveCmd.Flags().StringP("proof", "o", "", `File to write proof to (default "Proofs/$index.json.gz")`)
issuerKeyproveCmd.Flags().UintP("counter", "c", 0, "Counter of key to prove (default to latest)")
issuerKeyproveCmd.Flags().StringP("privatekey", "s", "", `File to get private key from (default "<path>/PrivateKeys/$counter.xml")`)
issuerKeyproveCmd.Flags().StringP("publickey", "p", "", `File to get public key from (default "<path>/PublicKeys/$counter.xml")`)
issuerKeyproveCmd.Flags().StringP("proof", "o", "", `File to write proof to (default "<path>/Proofs/$index.json.gz")`)
issuerKeyproveCmd.Flags().UintP("counter", "c", 0, "Counter of key to prove (defaults to latest)")
}
func lastPrivateKeyIndex(path string) (counter int) {
......
......@@ -16,11 +16,13 @@ import (
)
var issuerKeyverifyCmd = &cobra.Command{
Use: "keyverify [path]",
Use: "keyverify [<path>]",
Short: "Verify validity proof for an IRMA issuer keypair",
Long: `Verify validity proof for an IRMA issuer keypair.
The keyverify command verifies proofs of validity for IRMA issuer keys. By default, it verifies the newest proof in the Proofs folder, matching it to the corresponding key in PublicKeys.`,
The keyverify command verifies a proof of validity for an IRMA issuer private/public keypair. By
default, it verifies the newest proof in the <path>/Proofs folder, matching it to the corresponding
key in <path>/PublicKeys. If not specified, <path> is taken to be the current working directory.`,
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
flags := cmd.Flags()
......@@ -132,7 +134,7 @@ func lastProofIndex(path string) (counter int) {
func init() {
issuerCmd.AddCommand(issuerKeyverifyCmd)
issuerKeyverifyCmd.Flags().StringP("publickey", "p", "", `File of public key to verify (default "PublicKeys/$index.xml")`)
issuerKeyverifyCmd.Flags().StringP("proof", "o", "", `File of proof to verify (default "Proofs/$counter.json.gz")`)
issuerKeyverifyCmd.Flags().UintP("counter", "c", 0, "Counter of key to verify (default to latest with proof)")
issuerKeyverifyCmd.Flags().StringP("publickey", "p", "", `File of public key to verify (default "<path>/PublicKeys/$index.xml")`)
issuerKeyverifyCmd.Flags().StringP("proof", "o", "", `File of proof to verify (default "<path>/Proofs/$counter.json.gz")`)
issuerKeyverifyCmd.Flags().UintP("counter", "c", 0, "Counter of key to verify (defaults to latest with proof)")
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment