Commit Graph

249 Commits

Author SHA1 Message Date
Justus Winter
8e1ae6e0a3
Use public accessors. 2023-12-11 15:40:31 +01:00
Justus Winter
8216857de2
Strip secret key material from emitted revocation certificates.
- When doing a userid, subkey, or third-party certificate
    revocation, with the cert given to --certificate-file containing
    secret key material, we previously emitted a revocation
    certificate containing secret key material.

  - This patch changes that in a straight-forward way that is easy to
    backport to prior versions.  A more comprehensive fix will follow.

  - Fixes #160.
2023-12-11 15:40:31 +01:00
Justus Winter
4ed3d371e5
Replace once_cell with types from the standard library. 2023-12-06 17:42:48 +01:00
Justus Winter
3a885d8dbf
Remove outdated comments. 2023-12-06 17:37:09 +01:00
Justus Winter
1bad4fff20
Port to sequoia-cert-store 0.4.0. 2023-12-06 17:27:20 +01:00
Justus Winter
f6b936d889
Fix warning. 2023-11-30 14:42:12 +01:00
Justus Winter
b8f9670497
Improve pluralization: make it convenient and prevent word-wrapping. 2023-11-30 14:42:11 +01:00
Justus Winter
e028f90fdb
Improve network lookup UX; return an error if no cert was found.
- If the default set of keyservers is used, do not emit error
    messages unless --verbose is given or the search returned no cert
    at all.

  - If no cert was located, signal an error.

  - See #156.
2023-11-30 11:10:19 +01:00
Justus Winter
101309c88a
Improve the interactive-use test with the new IsTerminal. 2023-11-30 10:22:15 +01:00
Justus Winter
4d40c983a5
Fix unstable cli warning.
- The heuristic got broken because newer versions of
    terminal_size::terminal_size consider the PTY, not
    necessarily stdout.

  - Fixes ab8df96e5b.
2023-11-29 17:54:40 +01:00
Justus Winter
64d9012a5d
Replace custom reimplementation of std::sync::Once. 2023-11-29 17:38:12 +01:00
Justus Winter
5244b8d49a
Add --verbose. 2023-11-29 17:15:28 +01:00
Justus Winter
decbc5143a
Special-case the read-only Proton keyserver when sending. 2023-11-29 17:11:41 +01:00
Justus Winter
8d00aff2a2
Make sq keyserver get --server ... work.
- Mark sq keyserver --server argument as global so that it can be
    used in all keyserver subcommands.
2023-11-29 16:50:11 +01:00
Justus Winter
2ab3bd5efd
Word-wrap lines in human-readable messages.
- Replace every eprintln by wprintln, which prints to stderr as
    well, but word-wraps the messages.
2023-11-29 16:41:40 +01:00
Justus Winter
0400ae88eb
Rework signature status formatting. 2023-11-29 16:13:23 +01:00
Justus Winter
50c5c1ac86
Bump all dependencies. 2023-11-29 14:06:20 +01:00
Justus Winter
14b1a69eb4
Update subplot. 2023-11-29 14:06:20 +01:00
Justus Winter
ab8df96e5b
Update terminal_size. 2023-11-29 14:06:20 +01:00
Justus Winter
a19f4ecd25
Update predicates. 2023-11-29 14:06:20 +01:00
Justus Winter
f4f5f20e6e
Avoid deprecated function. 2023-11-29 14:06:20 +01:00
Justus Winter
544075bd86
Set our MSRV to 1.70. 2023-11-29 14:06:20 +01:00
Justus Winter
f8e32f2f16
Update itertools. 2023-11-29 13:33:27 +01:00
Justus Winter
537433d790
Update openssl to 0.10.60.
- Fixes https://rustsec.org/advisories/RUSTSEC-2023-0072
2023-11-29 11:57:11 +01:00
Justus Winter
cc1225f841
Require that only one keyserver send operation succeeds.
- Add a switch, --require-all, that checks that all send operations
    succeed, and returns an error otherwise.
2023-11-28 19:22:48 +01:00
Justus Winter
5127f1abb7
Improve formatting of the import output. 2023-11-28 17:44:07 +01:00
Justus Winter
424646e0f8
Make provenance information less overwhelming.
- See #156.
2023-11-28 17:26:30 +01:00
Justus Winter
e0e8b8f32c
Compute best-effort primary user ids, escape them when displaying.
- They may contain special characters and trick the user.  The
    current way to detect dodgy characters and escape them may not be
    the best, but it is better than the status quo, and we now encode
    intent.
2023-11-28 17:25:21 +01:00
Justus Winter
041574d320
Merge certs before importing them. 2023-11-28 12:52:50 +01:00
Justus Winter
712add9679
Align the keyserver options between sq lookup and sq keyserver. 2023-11-28 12:44:43 +01:00
Justus Winter
67b65ba55a
Use four keyservers by default.
- By using more than one keyserver, we increase the chance of
    successfully finding certificates and updates.  Further, multipath
    discovery increases robustness in the face of an attacker or
    censor.

  - We use keys.openpgp.org, the Proton key server, the Mailvelope
    keyserver, and the Ubuntu keyserver.
2023-11-28 12:38:01 +01:00
Justus Winter
e89a0b6c36
Implement sq lookup.
- Fixes #63.
2023-11-28 09:48:52 +01:00
Justus Winter
376438330e
Share the bulk of the network client code across protocols. 2023-11-28 09:48:52 +01:00
Justus Winter
6f9269b9c0
When emitting keyrings, merge the certs first.
- Now that we query multiple keyservers, or query for multiple certs
    in the network routines, we very well get the same cert twice.
    Merge them if we emit a keyring.
2023-11-28 09:08:47 +01:00
Justus Winter
d4632beb77
Refactor network client code so that it can be shared. 2023-11-28 09:08:46 +01:00
Justus Winter
975ce49581
Use the multi-threaded tokio runtime for network lookups. 2023-11-27 17:48:12 +01:00
Justus Winter
fb31dd6225
Proton has two API endpoints, unify them.
- I was assured privately that they should always return the same
    information, but unfortunately there is no public documentation
    about the Proton key server.  In any case, they are controlled by
    the same entity, thus should be considered the same for our
    purposes.
2023-11-27 17:43:48 +01:00
Justus Winter
f3757c004e
Revert argument long form.
- Renaming the struct field also changed the long form option, undo
    this by explicitly specifying it.

  - Fixes 337589fe9e.
2023-11-27 16:35:10 +01:00
Justus Winter
68353596cf
Fix the time in the example.
- Fixes 16fd67a10c.
2023-11-27 14:41:53 +01:00
Justus Winter
23d6621e37
Implement autocrypt import.
- Fixes #138.
2023-11-27 13:34:01 +01:00
Justus Winter
187b10e321
Make import and certification functions public. 2023-11-27 13:33:24 +01:00
Justus Winter
337589fe9e
Support querying multiple keyservers simultaneously.
- By default we only query keys.openpgp.org, but multiple servers
    can be specified now.

  - Fixes #64.
2023-11-27 12:02:19 +01:00
Justus Winter
c6152c4846
Allow multiple, simultaneous DANE queries in one invocation.
- Fixes #141.
2023-11-24 17:40:26 +01:00
Justus Winter
ddbe7a2681
Allow multiple, simultaneous WKD queries in one invocation.
- See #141.
2023-11-24 17:40:26 +01:00
Justus Winter
a6f36bc7b5
Allow multiple, simultaneous keyserver queries in one invocation.
- See #141.
2023-11-24 17:40:26 +01:00
Justus Winter
4b9c0d57e8
Generate DANE OPENPGPKEY records.
- Fixes #152.
2023-11-24 17:40:26 +01:00
Justus Winter
adc2ed4773
Port to sequoia-net 0.28.0. 2023-11-24 17:40:26 +01:00
Justus Winter
62dbde6b03
Silence compiler warning.
- This import is not necessary if the dot-writer feature is enabled,
    but necessary if it is not.
2023-11-24 17:40:26 +01:00
Justus Winter
041a41c01c
Port to sequoia-openpgp 1.17. 2023-11-24 17:40:26 +01:00
Justus Winter
de42ad66c9
ci: Use Debian Trixie, Rust 1.67. 2023-11-24 17:40:26 +01:00