Commit Graph

1427 Commits

Author SHA1 Message Date
Neal H. Walfield
f9d1112735
Refactor the user ID designators.
- Don't parameterize over the arguments (e.g., `--email`) and their
    semantics.  Just parameterize over the semantics.  For a given set
    of semantics, enable all arguments (i.e., a user id, an email, and
    a name variant).

  - This commit does not change any arguments or their semantics.
2024-12-13 18:18:00 +01:00
Justus Winter
4b755cf2a2
Update all dependencies. 2024-12-13 17:01:38 +01:00
Justus Winter
c60a2d33fb
Fix test.
- Give Sequoia a little space to backdate the signatures.  Note:
    It will not backdate them past the key creation time.
2024-12-13 17:01:38 +01:00
Justus Winter
0cebcf5ea9
Trim unused features on sequoia-cert-store. 2024-12-13 16:48:18 +01:00
Justus Winter
50e941164c
Update sequoia-net and reqwest. 2024-12-13 16:47:32 +01:00
Justus Winter
e08b254d15
Add argument sq network search --iterations.
- Fixes #478.
2024-12-13 16:38:36 +01:00
Justus Winter
c9d7eb8878
Add argument sq network search --use-dane.
- See #478.
2024-12-13 16:38:36 +01:00
Justus Winter
964f9dd51f
Add argument sq network search --use-wkd.
- See #478.
2024-12-13 16:38:36 +01:00
Neal H. Walfield
1a8dd3e467
Better handle user ID's matched by --all.
- Change `sq pki link add`, `sq pki link authorize`, `sq pki link
    retract`, `sq pki vouch add`, and `sq pki vouch authorize` to
    better handle unusable user IDs matched by `--all`.  Specifically,
    if the user explicitly designates a user ID and we can't use it,
    then fail loudly, but if a user ID is selected by `--all` and it
    not usable, only emit a warning.
2024-12-13 14:31:31 +01:00
Neal H. Walfield
1dfaaeb644
Make --all conflict with other user ID designators.
- Make the `--all` user ID designator conflict with other user
    ID designators.
2024-12-13 14:31:31 +01:00
Neal H. Walfield
d830691779
Fix test for sq pki link retract.
- Fix the user ID designator test for `sq pki link retract`.  It
    didn't actually test `sq pki link retract`.
2024-12-13 14:31:31 +01:00
Justus Winter
09882042b1
Make sq cert list display certificates without user IDs.
- If a cert has been explicitly given via the cert designators, we
    want to display it even if it has no bindings.

  - Fixes #501.
2024-12-12 16:51:05 +01:00
Justus Winter
f292912564
Prepare for userid-less certificates in common::pki::authenticate. 2024-12-12 16:38:08 +01:00
Justus Winter
519f580119
Split OutputFormat::add_paths into two functions. 2024-12-12 15:45:01 +01:00
Justus Winter
82f3f292c2
Fix listing certificates without authenticated bindings.
- Fixes ebef0cf9ee.

  - See #501.
2024-12-12 14:12:24 +01:00
Justus Winter
f7eade37c8
Apply the input lints to all certs.
- Fixes ebef0cf9ee.

  - See #501.
2024-12-12 14:12:22 +01:00
Justus Winter
ca3b953bd3
Only show hints about an empty cert store if it is indeed empty.
- Fixes ebef0cf9ee.

  - See #501.
2024-12-12 14:12:16 +01:00
Justus Winter
4df20e9b9a
Change sq config inspect policy to explain the policy.
- Emitting the machine-readable policy configuration is not very
    helpful.  Instead, explain the effective policy, and how to change
    it.  This aligns the subcommand with the other `sq config inspect`
    subcommands.

  - Fixes #490.
2024-12-12 12:26:53 +01:00
Justus Winter
8d7155de32
Fix warnings about elided lifetimes that have a name. 2024-12-12 12:26:50 +01:00
Neal H. Walfield
5079c8ee66
Add tests for sq key approvals update.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:05 +01:00
Neal H. Walfield
29329e5dec
tests: Improve sq key approvals update help functions.
- Adjust the API for `Sq::key_approvals_update` and add
    `Sq::try_key_approvals_update`.
2024-12-12 10:47:04 +01:00
Neal H. Walfield
e227aecbc2
Add tests for sq key approvals list.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:04 +01:00
Neal H. Walfield
52fdea48e2
Add tests for sq key userid revoke.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:04 +01:00
Neal H. Walfield
9564c5cf99
Add tests for sq pki lookup.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:04 +01:00
Neal H. Walfield
551084b560
Add tests for sq pki authenticate.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:04 +01:00
Neal H. Walfield
4e5dcba9b1
Add tests for sq pki vouch {add,authorize}.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:04 +01:00
Neal H. Walfield
aa031eaf7c
tests: Rename Sq::pki_vouch_authorize_p.
- Rename `Sq::pki_vouch_authorize_p` to
    `Sq::try_pki_vouch_authorize`.
2024-12-12 10:47:03 +01:00
Neal H. Walfield
5c11414386
tests: Simplify Sq::try_pki_vouch_add and Sq::pki_vouch_authorize_p.
- Remove the `success` parameter from `Sq::try_pki_vouch_add` and
    `Sq::pki_vouch_authorize_p` and just propagate any error to the
    caller.  This is more consistent with the rest of the functions.
2024-12-12 10:47:03 +01:00
Neal H. Walfield
a979d343a2
Add tests for sq pki link retract.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:03 +01:00
Neal H. Walfield
2dac8e6253
Add tests for sq pki link authorize.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:03 +01:00
Neal H. Walfield
69d85bf3d4
Add tests for sq pki link add.
- Test that the user ID designators behave correctly.
2024-12-12 10:47:03 +01:00
Neal H. Walfield
448f83811a
Simplify comments. 2024-12-12 10:19:33 +01:00
Justus Winter
9b00fa43da
Lint CLI help texts. 2024-12-11 17:56:28 +01:00
Justus Winter
edc803eb21
Align CLI help texts with our UI guidelines.
- See #488.
2024-12-11 17:56:28 +01:00
Justus Winter
379248aa64
Make long help texts configurable for cert designators. 2024-12-11 17:56:28 +01:00
Justus Winter
3f81e65ecb
Deduplicate and rework the signature notation argument handling. 2024-12-11 17:56:28 +01:00
Justus Winter
830c49def0
Require explicit opt-out for encrypting without signing.
- Fixes #459.
2024-12-11 17:29:36 +01:00
Justus Winter
ebef0cf9ee
Use cert designators for sq cert list.
- This aligns it with `sq key list` and `sq pki link list`.

  - Fixes #446.
2024-12-11 16:24:43 +01:00
franzi
3d4554a5a4
Add examples for sq cert list
- List all bindings for User IDs containing a specific email address
- List all paths to a specific certificate
- See: #451
2024-12-11 14:12:33 +01:00
franzi
03578878fe
Refactor files in /cli/cert to new example framework
- no content changes
- see: #451
2024-12-11 14:12:24 +01:00
Malte Meiboom
898ccc753f
Modify examples
- Don't encourage unprotected keys
- sq key generate: Don't show '--without-password'
- sq key subkey add: Don't show '--without-password'
- See: #451
2024-12-11 14:03:48 +01:00
Malte Meiboom
4158d4045b
Refactor files under .../cli/key to use example framework
- Just refactoring, no changes to content
2024-12-11 14:03:48 +01:00
Justus Winter
02f0dc44fa
Fix generation of user ID-less keys.
- Fixes #491.
2024-12-11 13:29:32 +01:00
Justus Winter
44d97fc920
Upgrade hickory-proto to avoid vulnerable idna 0.4.0.
- See https://rustsec.org/advisories/RUSTSEC-2024-0421
2024-12-11 12:44:49 +01:00
Justus Winter
01aa4dc06a
Gracefully handle missing ui section in config file.
- Fixes `sq config get` without the [ui] section in the config file,
    while making sure that `sq config get` reflects whether hints are
    displayed.

  - Fixes #495.
2024-12-09 15:21:35 +01:00
Justus Winter
3ab852aba2
Add sq encrypt --profile in preparation for RFC9580.
- Fixes #463.
2024-12-04 16:18:43 +01:00
Justus Winter
6cf2acc893
Add sq key generate --profile in preparation for RFC9580.
- See #463.
2024-12-04 16:17:28 +01:00
Justus Winter
ab01bd9557
Parse key.generate.cipher-suite case sensitively.
- This matches the parsing of the command line parameter.  Let's
    reduce variance.
2024-12-04 15:31:07 +01:00
Justus Winter
9e2af6a92f
Mention the configuration key in the augmented help texts. 2024-12-04 15:15:24 +01:00
Justus Winter
98203e6cd0
Make sq network dane generate require cert designators or --all.
- Fixes #476.
2024-12-04 14:39:20 +01:00