Commit Graph

1407 Commits

Author SHA1 Message Date
Justus Winter
6199119811
Make sq inspect handle non-OpenPGP data.
- Incidentally, this fixes #197.
2024-10-21 14:21:28 +02:00
Justus Winter
e1f308272d
Fix hint formatting. 2024-10-21 14:21:25 +02:00
Justus Winter
12efeceac5
Enable the use of state in the subplot tests. 2024-10-21 13:02:24 +02:00
Justus Winter
68cac26f21
Set a SEQUOIA_HOME directory for the subplot tests. 2024-10-21 13:00:08 +02:00
Justus Winter
bcb5c39aca
Remove the DWIM interface from sq cert export.
- The cert designator framework is expressive enough.  Just be
    explicit.
2024-10-21 12:39:57 +02:00
Justus Winter
db0fe0873d
Fix mutability of recipient in accessors. 2024-10-21 12:39:55 +02:00
Justus Winter
1d1a41ac3d
Only export certificates with authenticated bindings.
- When exporting certificates selected by user IDs (i.e. --email,
    --userid, --domain, or --grep), authenticate the bindings and
    export only those certificates that can be authenticated.

  - Fixes #182.
2024-10-21 11:37:10 +02:00
Justus Winter
b98ffa6514
Remove obsolete todos. 2024-10-19 00:29:19 +02:00
Justus Winter
3942d9892e
Hide certification and key creation times for shadow CAs.
- It is confusing to see a creation time of 2002-02-20.  Hide it.
2024-10-19 00:28:36 +02:00
Justus Winter
8f65d9a79a
Remove redundant trust amount information.
- This is precisely the same amount as before in the same sentence.
2024-10-19 00:28:34 +02:00
Justus Winter
9510870b8f
Use non-breaking hyphens to format dates. 2024-10-19 00:28:31 +02:00
Justus Winter
efb35f517f
Filter out self-signatures when --gossip is given. 2024-10-19 00:28:28 +02:00
Justus Winter
1300f3dd59
Remove now unused non-concise human readable output format. 2024-10-19 00:28:26 +02:00
Justus Winter
17deb24057
Make the path output a little less dense. 2024-10-19 00:27:55 +02:00
Justus Winter
cef1b792dd
Merge the path printing into the concise human readable output.
- Having a single output makes it easier to keep the output
    consistent.
2024-10-19 00:27:48 +02:00
Justus Winter
bc61c8a84c
Align the output of sq cert list with sq key list. 2024-10-18 17:49:10 +02:00
Justus Winter
fece9407ef
Align timestamp formatting. 2024-10-18 17:43:51 +02:00
Justus Winter
3c80873511
Align hint formatting. 2024-10-18 17:10:11 +02:00
Justus Winter
eb1545591c
Split sq network wkd publish --rsync into two to avoid ambiguity.
- The argument `sq network wkd --rsync` which previously had an
    optional value argument has been split into two arguments, a
    boolean `--rsync` to enable the use of rsync, and `--rsync-path`,
    which implies `--rsync`, to specify a path to the local rsync
    executable.

  - Fixes #370.
2024-10-18 17:02:02 +02:00
Justus Winter
2604bf2e9c
Fix documentation. 2024-10-18 16:32:31 +02:00
Justus Winter
d07e387eab
Rename sq verify --signer-cert to --signer.
- Fixes #372.
2024-10-18 16:32:11 +02:00
Justus Winter
b2f0e579ba
Simplify crate::load_keys. 2024-10-18 16:17:06 +02:00
Justus Winter
a3d2becc90
Simplify crate::load_certs. 2024-10-18 16:15:37 +02:00
Justus Winter
2a40afef11
Add --all flag to sq network wkd publish and dane generate.
- Fixes #273.
2024-10-18 16:01:51 +02:00
Justus Winter
361e68a248
Use imperative mood to describe the cert and user ID designators. 2024-10-18 14:49:59 +02:00
Justus Winter
75577c65c0
Make sq --home=default work.
- Home::new(None) doesn't select the default location, it honors
    SEQUOIA_HOME.
2024-10-18 14:49:58 +02:00
Justus Winter
cea028e582
Remove sq network dane generate --skip.
- This didn't do what it said on the tin (it said to skip expired
    certs, but Cert::with_policy doesn't care about expiration).
    Further, asking to publish a cert that doesn't have a user ID in
    that domain should probably just be an error.

  - Previously, the now removed `sq network wkd generate` command also
    had a `--skip` flag, but the replacement `sq network wkd publish`
    never had that flag.

  - Fixes #371.
2024-10-18 14:49:57 +02:00
Neal H. Walfield
f934cd2e31
Move sq pki list to sq cert list.
- Move the command `sq pki list` to `sq cert list`.

  - See #358.
2024-10-18 12:17:50 +02:00
Neal H. Walfield
1f50f6fd79
Rename test files.
- Rename test files to reflect the commands they are testing.
2024-10-18 09:47:39 +02:00
Neal H. Walfield
a779fbb277
Add a test.
- `sq pki link authorize` certifies all self-signed user IDs when
    no user IDs are provided.  Add a test that checks that it silently
    ignores invalid self-signed user IDs (e.g., revoked user IDs) in
    this case.
2024-10-18 09:45:08 +02:00
Neal H. Walfield
9ad9355ed4
Don't try to certify invalid user IDs.
- `sq pki vouch authorize` certifies all self-signed user IDs when
    no user IDs are provided.  Change it to silently ignore invalid
    self-signed user IDs (e.g., revoked user IDs) in this case.
2024-10-18 09:41:07 +02:00
Neal H. Walfield
df727ab861
Make it easier to debug failing examples.
- When testing an example, print out where it came from so that it
    is easier to find.
2024-10-18 08:49:11 +02:00
Neal H. Walfield
9d2d34b990
Move sq pki {certify,authorize} under sq pki vouch.
- Move `sq pki certify` and `sq pki authorize` under `sq pki vouch`.

  - This mirrors `sq pki link`.
2024-10-18 08:49:07 +02:00
Neal H. Walfield
609c5aab16
Split authorization functionality out of sq pki link add.
- Split authorization functionality out of `sq pki link add` into a
    new command, `sq pki link authorize`.

  - Align `sq pki link authorize`'s arguments with `sq pki authorize`
    arguments.
2024-10-17 16:42:35 +02:00
Neal H. Walfield
cd7b79dbae
Generalize helper function.
- Generalize `Sq::pki_link_add` and `Sq::pki_link_add_maybe` to take
    zero or more user IDs.
2024-10-17 16:41:57 +02:00
Neal H. Walfield
2e8833bb1a
Reorder sq pki link add's options.
- Reorder `sq pki link add`'s arguments so that they appear in a more
    logical order when reading `--help` (required arguments first,
    then grouped and approximately ordered by how often they are
    likely to be used).
2024-10-17 16:41:57 +02:00
Neal H. Walfield
92d6303b09
Dedup user IDs.
- Change `UserIDDesignators::resolve` to dedup the user IDs.
2024-10-17 16:41:57 +02:00
Justus Winter
d1a10b9346
Identify common user errors when verifying detached signatures.
- And try to give helpful advice.

  - Fixes #162.
2024-10-17 15:02:08 +02:00
Justus Winter
7c1296da56
Fix example description. 2024-10-17 15:02:07 +02:00
Justus Winter
0789cd57db
Make inspect return the kind of data it thinks it is looking at. 2024-10-17 15:02:06 +02:00
Neal H. Walfield
50085f3c50
Port sq pki link retract to the user ID designator framework.
- Change `sq pki link retract` to use the user ID designator
    framework.
2024-10-16 13:40:00 +02:00
Neal H. Walfield
d2f762ed36
Don't require --add-userid if that option isn't enabled.
- `UserIDDesignators::resolve` required the `--add-userid` option be
    present to designate a non-self-signed user ID.

  - Relax this requirement if the `--add-userid` option is not
    enabled.
2024-10-16 13:40:00 +02:00
Neal H. Walfield
f2566473e1
Improve output when retracting a link. 2024-10-16 12:38:24 +02:00
Neal H. Walfield
386992f14f
Fix sq pki link retract when retracting all certifications.
- When retracting all certifications, don't just retract
    certifications on the self-signed user IDs, retract them on all
    user IDs.
2024-10-16 12:38:22 +02:00
Neal H. Walfield
43db8fa44c
Check all user IDs, not just self-signed user IDs.
- When checking if a user ID was already signed, don't just check
    valid self-signed user IDs.
2024-10-16 12:36:45 +02:00
Neal H. Walfield
7dee04b9b3
Align sq pki link add's user ID specification with sq pki certify.
- Align how user IDs are specified using `sq pki link add` with `sq
    pki certify`.  Specifically, add a `--add-userid` argument and
    remove the `--petname` argument.
2024-10-15 17:32:29 +02:00
Neal H. Walfield
f0bfdfd1cd
Remove sq pki link retract's positional argument for specifying a user ID.
- `sq pki link retract` has a positional argument for specifying a user
    ID directly or by email address.  Remove it in favor of the named
    arguments, `--userid` and `--email`.

  - See #318.
2024-10-15 17:32:25 +02:00
Neal H. Walfield
dd75de8178
Remove sq pki link add's positional argument for specifying a user ID.
- `sq pki link add` has a positional argument for specifying a user
    ID directly or by email address.  Remove it in favor of the named
    arguments, `--userid` and `--email`.

  - See #318.
2024-10-15 17:31:49 +02:00
Neal H. Walfield
34df026d87
Change sq pki link retract to use a named argument for the certificate.
- `sq pki link retract` uses a positional argument to specify the
    certificate to retract.  Change it to be a named argument, `--cert`.

  - See #318.
2024-10-15 17:30:57 +02:00
Neal H. Walfield
bc075f9328
Change sq pki link add to use a named argument for the certificate.
- `sq pki link add` uses a positional argument to specify the
    certificate to link.  Change it to be a named argument, `--cert`.

  - See #318.
2024-10-15 17:30:22 +02:00