diff options
Diffstat (limited to 'sq/src/sq_cli.rs')
-rw-r--r-- | sq/src/sq_cli.rs | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs index 692a1937..da527804 100644 --- a/sq/src/sq_cli.rs +++ b/sq/src/sq_cli.rs @@ -461,6 +461,90 @@ pub fn configure(app: App<'static, 'static>) -> App<'static, 'static> { from stdin)"))) ) + + .subcommand(SubCommand::with_name("certify") + .about("Certify a User ID for a Certificate") + .arg(Arg::with_name("depth") + .value_name("TRUST_DEPTH") + .help("The trust depth (sometimes referred to as \ + the trust level). 0 means a normal \ + certification of <CERTIFICATE, USERID>. \ + 1 means CERTIFICATE is also a trusted \ + introducer, 2 means CERTIFICATE is a \ + meta-trusted introducer, etc. The \ + default is 0.") + .long("depth") + .short("d")) + .arg(Arg::with_name("amount") + .value_name("TRUST_AMOUNT") + .help("The amount of trust. \ + Values between 1 and 120 are meaningful. \ + 120 means fully trusted. \ + Values less than 120 indicate the degree \ + of trust. 60 is usually used for partially \ + trusted. The default is 120.") + .long("amount") + .short("a")) + .arg(Arg::with_name("regex") + .value_name("REGEX") + .help("Adds a regular expression to constrain \ + what a trusted introducer can certify. \ + The regular expression must match \ + the certified User ID in all intermediate \ + introducers, and the certified certificate. \ + Multiple regular expressions may be \ + specified. In that case, at least \ + one must match.") + .long("regex") + .short("r") + .multiple(true)) + .arg(Arg::with_name("local") + .help("Makes the certification a local \ + certification. Normally, local \ + certifications are not exported.") + .long("local") + .short("l")) + .arg(Arg::with_name("non-revocable") + .help("Marks the certification as being non-revocable. \ + That is, you cannot later revoke this \ + certification. This should normally only \ + be used with an expiration.") + .long("non-revocable")) + + .group(ArgGroup::with_name("expiration-group") + .args(&["expires", "expires-in"])) + .arg(Arg::with_name("expires") + .value_name("TIME") + .long("expires") + .help("Absolute time when the certification should \ + expire, or 'never'.")) + .arg(Arg::with_name("expires-in") + .value_name("DURATION") + .long("expires-in") + // Catch negative numbers. + .allow_hyphen_values(true) + .help("Relative time when the certification should \ + expire. Either 'N[ymwd]', for N years, \ + months, weeks, or days, or 'never'. The \ + default is 5 years.")) + + .arg(Arg::with_name("certifier") + .value_name("CERTIFIER") + .required(true) + .index(1) + .help("The key to certify the certificate.")) + .arg(Arg::with_name("certificate") + .value_name("CERTIFICATE") + .required(true) + .index(2) + .help("The certificate to certify.")) + .arg(Arg::with_name("userid") + .value_name("USERID") + .required(true) + .index(3) + .help("The User ID to certify.")) + ) + .subcommand(SubCommand::with_name("packet") .display_order(610) .about("OpenPGP Packet manipulation") |