767 Commits

Author SHA1 Message Date
Neal H. Walfield
d8ad8dcd42
Switch sq cert export to the certificate designator abstraction.
- Use `CertDesignators` to expose `sq cert export`'s certificate
    designator arguments.
2024-09-25 13:15:57 +02:00
Neal H. Walfield
9a46a12a79
Fix sq cert export test vector.
- A `sq cert export` test vector specified `--email
    carol@example.org`, which doesn't match any certificates.  The error
    was hidden, because we were not strict about ensuring that all
    certificate designators actually match at least one certificate.

  - Fix the test vector.
2024-09-25 13:15:57 +02:00
Neal H. Walfield
16aaab33b9
Add a certificate designator abstraction.
- Add a new type, `CertDesignators`, which can be flattened into a
    clap subcommand, and exposes one or more certificate designator
    arguments (`--file`, `--cert`, `--userid`, `--userid`, `--domain`,
    and `--grep`) with an optional prefix (e.g., it transforms `--file`
    into `--cert-file`).

  - See #207.
2024-09-25 13:15:57 +02:00
Neal H. Walfield
0592a4041b
Add a test for sq encrypt for revoked subkeys.
- Add a test for `sq encrypt` that checks that an attempt to use
    a revoked subkey results in an error.
2024-09-25 13:15:57 +02:00
Neal H. Walfield
b8d02f2216
Add a test for sq encrypt for expired subkeys.
- Add a test for `sq encrypt` that checks that an attempt to use
    an expired subkeys results in an error unless
    `--use-expired-subkey` is provided.
2024-09-25 13:15:46 +02:00
Neal H. Walfield
5bc7a81045
Add a test for sq encrypt for non-encryption-capable certifications.
- Add a test for `sq encrypt` that checks that an attempt to use
    a certificate that is not encryption-capable results in an error.
2024-09-25 13:15:32 +02:00
Neal H. Walfield
3965167ac0
Add a test for sq encrypt's certificate designators.
- Add a test for `sq encrypt` that checks that the different ways of
    designating a certificate work including making sure that only
    authenticated names can be used to designate a certificate.
2024-09-25 13:09:58 +02:00
Neal H. Walfield
42f43f656e
Port sq_encrypt.rs to the common test framework. 2024-09-25 12:18:44 +02:00
Justus Winter
f88b433d8b
Move implementation, add NEWS entry.
- Fixes e2d5bc1de46d8fbe23537d1f3c124943a8d1f2f9.
2024-09-24 15:10:29 +02:00
Justus Winter
e2d5bc1de4
Move sq key userid strip to sq toolbox strip-userid.
- Fixes #306.
2024-09-16 16:16:32 +02:00
Neal H. Walfield
9cfc2e9a16
Make sq key expire more robust.
- When updating a component's expiration, we collect the new self
    signatures in a vector, append them to the certificate using
    `Cert::insert_packets`, and rely on canonicalize to reorder them.

  - To make reordering simpler and more robust (see issue #1125 in
    sequoia-openpgp), precede the new self signature by a copy of the
    component.

    https://gitlab.com/sequoia-pgp/sequoia/-/issues/1125
2024-09-16 15:35:54 +02:00
Neal H. Walfield
292b32fc65
Improve debugging output. 2024-09-16 15:35:54 +02:00
Neal H. Walfield
910edc96f6
Add a convenience function to preserve a test's state.
- Add `Sq::preserve` to prevent the files created by an `Sq`
    instance from being deleted when the `Sq` instance is dropped.

  - Preserving the state makes it easier to debug a test that is
    failing.
2024-09-16 15:35:47 +02:00
Justus Winter
7d6040b5ad
Improve comments of revocation certificates. 2024-09-16 15:22:08 +02:00
Justus Winter
b1f8e5e38a
Wrap comment lines in revocation certificates. 2024-09-16 15:02:28 +02:00
Justus Winter
2c4ecbb41e
Align sq key subkey expire and sq key subkey revoke.
- Make the latter take a named --key argument that can be given
    multiple times.

  - Fixes #329.
2024-09-16 15:01:24 +02:00
Justus Winter
719f282544
Move the sq key subkey CLI parser to its own module. 2024-09-16 14:14:32 +02:00
Justus Winter
d31eea691e
Move the sq key revoke CLI parser to its own module. 2024-09-16 14:04:07 +02:00
Justus Winter
6034e03893
Avoid using the system-wide crypto policy in tests.
- Fixes #177.
2024-09-16 12:53:33 +02:00
Justus Winter
5b1336c4e1
Implement sq --quiet.
- Also, go over the commands and change some prints to be disabled
    when --quiet is given, use the hint framework.

  - Fixes #314.
2024-09-11 17:20:57 +02:00
Justus Winter
65af1e6ef8
Remove debugging remnant. 2024-09-11 17:11:53 +02:00
Devan Carpenter
759c568c0e
ci: remove pre-common-ci vestiges 2024-09-03 14:23:29 -05:00
Justus Winter
dfaba32a7a
Release 0.38.0. 2024-09-03 17:23:42 +02:00
Justus Winter
749a8e770c
Require exact --name and --email matches.
- See #309.
2024-09-03 17:23:42 +02:00
Justus Winter
9861598940
Drop dependency itertools. 2024-09-03 17:23:41 +02:00
Justus Winter
1f6e079947
Link to the new user documentation. 2024-09-03 17:16:31 +02:00
Justus Winter
0bf2adac9e
Fix cleartext, message signing with --signer-cert. 2024-09-03 17:16:30 +02:00
Justus Winter
2bffbc9ade
Improve wording. 2024-09-02 14:47:55 +02:00
Justus Winter
5c68890fb2
Update sequoia-keystore. 2024-09-02 14:47:55 +02:00
Justus Winter
578f6cb690
Update sequoia-openpgp. 2024-09-02 14:47:55 +02:00
Justus Winter
2eb38021ae
Add a RSA2k cipher suite.
- Fixes #327.
2024-09-02 14:47:54 +02:00
Justus Winter
5131a72569
Drop serde_json dependency. 2024-09-02 14:47:54 +02:00
Justus Winter
cc707466d3
Remove output format and version command line options.
- See #310.

  - Fixes #289.
2024-09-02 14:47:42 +02:00
Justus Winter
9d72502512
Port remaining tests to the common test framework. 2024-09-02 13:23:28 +02:00
Justus Winter
ba58234c79
Use the hint framework. 2024-09-02 13:23:28 +02:00
Justus Winter
9c4dfdaf11
Avoid eprintln in favor of wprintln. 2024-09-02 13:23:28 +02:00
Justus Winter
9a1dee4563
Avoid println in favor of wprintln. 2024-09-02 13:23:28 +02:00
Justus Winter
887f42193e
If a backend has no devices, hence no keys, it should say no keys.
- Fixes #313.
2024-09-02 13:23:25 +02:00
Justus Winter
bbfdebfd73
Rename sq encrypt --symmetric to --with-password.
- This is an ugly gpgism.  All encrypted messages are symmetrically
    encrypted.  Not all password-encrypted messages encrypt the
    session key symmetrically.  Use language the user understands.

  - Fixes #331.
2024-09-02 11:47:56 +02:00
Justus Winter
13c7d5a83b
Implement sq encrypt --symmetric-password-file.
- Fixes #271.

  - Fixes #58.
2024-09-02 11:43:48 +02:00
Justus Winter
7a052b2d24
Implement decryption of messages using the password cache. 2024-09-02 11:41:04 +02:00
Justus Winter
fc273e89d4
Implement sq key subkey add --new-password-file.
- See #271.
2024-09-02 11:41:04 +02:00
Justus Winter
ca6a68ba8a
Parallelize the subkey password test. 2024-09-02 10:22:21 +02:00
Justus Winter
0cf495bd90
Implement sq key generate --new-password-file.
- See #271.
2024-09-02 10:16:33 +02:00
Justus Winter
230f849307
Deny sq network wkd publish --create on existing WKDs. 2024-08-30 16:54:07 +02:00
Justus Winter
d42f0103de
Make sq network wkd publish --create require --cert.
- We cannot create empty WKD hierarchies due to how sequoia_net::wkd
    works.  For now, require at least one certificate to be inserted at
    creation time.

  - Fixes #323.
2024-08-30 16:48:07 +02:00
Justus Winter
2818d45e6b
Improve sq network wkd publish --help.
- Fixes #325.
2024-08-30 16:34:58 +02:00
Justus Winter
555478622b
Hint at using sq network wkd publish --create.
- Fixes #324.
2024-08-30 16:27:47 +02:00
Justus Winter
dd5ee688fb
tests: Port remaining tests to the test framework. 2024-08-30 14:33:00 +02:00
Justus Winter
945757684c
Fix terminology. 2024-08-29 13:20:03 +02:00