summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-10-19openpgp: Explicitly drop the Box.941-rfe-future-proofing-against-newly-added-algorithmsJustus Winter
- Appeases the compiler that now complains about the unused result.
2022-10-18Document how to update MSRV.Nora Widdecke
2022-10-18Update READMEs for new MSRV.Nora Widdecke
2022-10-18Document MSRV in Cargo.toml.Nora Widdecke
- Use Cargo.toml's rust-version field instead of a rust-toolchain file. It is more flexible and does not prevent use of newer compilers.
2022-10-14sq: Add Heiko and Lars to crate authorsWiktor Kwapisiewicz
2022-10-07Align msrv with rust-toolchain.Heiko Schaefer
See https://doc.rust-lang.org/stable/clippy/configuration.html#specifying-the-minimum-supported-rust-version
2022-10-07rust-toolchain: bump MSRV to 1.60.0Heiko Schaefer
Today, Debian testing (which will become the next Debian stable next year) has a Rust toolchain version 1.60.0. As per Sequoia-PGP project decision, our MSRV tracks what's going to be in the next Debian stable. Sponsored-by: pep.foundation
2022-10-07sq: drop now-unnecessary allow for a clippy warningHeiko Schaefer
Sponsored-by: pep.foundation
2022-10-07net: derive Default implementation instead of hand coding itHeiko Schaefer
Less code to maintain this way. Sponsored-by: pep.foundation
2022-10-07net: use Option::and_then instead of .map and .flattenHeiko Schaefer
More idiomatic this way. Sponsored-by: pep.foundation
2022-10-07autocrypt: use a char instead of a string with one characterHeiko Schaefer
A char as a pattern makes it more explicit that we're matching a single char. Sponsored-by: pep.foundation
2022-10-07openpgp: make effect of the code more obvious to readers.Heiko Schaefer
Sponsored-by: pep.foundation
2022-10-07Disable clippy lint unnecessary_lazy_evaluations.Heiko Schaefer
Resolves #935 (in which Neal argues: "the programmer always has to use a performance heuristic to determine whether to use unwrap_or or unwrap_or_else. The heuristic should be as simple as possible to reduce the programmer's cognitive burden and allow them to concentrate on the task at hand. A simple heuristic is: if the value is a literal, use unwrap_or otherwise use unwrap_or_else. This is reasonable given that the cost of using .unwrap_or_else(|| literal) instead of .unwrap_or(literal) is effectively zero; it is never wrong from a performance perspective to use unwrap_or_else instead of unwrap_or, but it can be wrong to use unwrap_or instead of unwrap_or_else.")
2022-09-29openpgp, sq: Update dependency rpassword to 6.Nora Widdecke
- rpassword underwent some rework. The successor of read_password_from_tty seems to be prompt_password, relevant commits to rpassword: - e6023757df00a67a1e16796db50c5ffad41b6268 - 2edf6cee07573ec4aa86531e6177ee90331d5c60
2022-09-29ipc: Fix computing keygrips.Justus Winter
2022-09-29ipc: Drop unused attribute.Justus Winter
2022-09-22Debian bookworm has dropped the libssl1.1 packageHeiko Schaefer
2022-09-20sq: write out manual pages for sqLars Wirzenius
Generate an all-in-one manual page sq.1, and a separate manual page for each leaf level subcommand: sq-armor.1, seq-key-generate.1, etc. We've previously had a grouping of subcommands per top level subcommand: all sub-subcommands of "sq key" would go into sq-key.1. However, I found that to be hard to follow, as a reader. I prefer either all in one, or just the one subcommand in a page. Use custom code to generate the manual page, in sq/src/man.rs, because I wasn't happy with clap_mangen output, and wanted something more idiomatic. The custom code is a little specific for sq, and may or may not be possible to use for other programs. To trigger manual page generation, run sq with SQ_MAN set to the name of a directory where the manual pages should be written, when running sq. This was an easier way to do this than a new, hidden subcommand ("sq generate-man" or something like that). Add the roff crate as a dependency. It's used to generate troff source code for manual pages. Generating correct troff is tricky enough that there's no point in doing it manually. Move the "SEE ALSO" section in the "after_help" text for "sq verify" into the "before_help" so that it doesn't end up as plain text in the manual page. This was an easier change than making the "sq help text markup" parser in sq/src/man.rs understand the SEE ALSO heading. Sponsored-by: pep.foundation
2022-09-16sq: port to new SubplotLars Wirzenius
Update the dependency on Subplot to 0.5.0. Subplot 0.5.0 requires document metadata (title, bindings files, etc) to be in its own YAML file, where previous versions required it to be embedded in Markdown (still as YAML). Move the metadata to sq.subplot and fix what breaks. Sponsored-by: pep.foundation
2022-09-15sq: Expose `dane get` command.Wiktor Kwapisiewicz
- Similar to "wkd get" this command will fetch OpenPGP certificates and display them in armored form with comments. - Fixes #865.
2022-09-15net: Add support for DANE certificate retrieval.Wiktor Kwapisiewicz
- Add dane::get. - Make EmailAddress functions pub(crate) to use them from the DANE module. - Add tests for generating correct FQDN. - See #865.
2022-09-09ipc: Reexport capnp_rpc.Neal H. Walfield
- Reexport the capnp_rpc crate to make it easier to users of the ipc library to use the same version of capnp_rpc as the ipc library. - This is needed, because some `capnp_rpc` types are part of the public API (specifically, the `Handler::handle` function).
2022-09-07sq: Rewrite detect_armor_kind.Nora Widdecke
2022-09-07sq: Refactor helper function.Nora Widdecke
- create_or_stdout is deprecated and only used by Config, pull it into impl Config.
2022-09-07sq: Clean up openpgp imports.Nora Widdecke
- We 'use sequoia_openpgp as openpgp' in sq.rs. That allows members referencing it as crate::openpgp. This is highly confusing, as openpgp is not actually part of this crate. - Fix the confusion by explicitly importing sequoia_openpgp.
2022-09-06Document MSRV policy.Nora Widdecke
2022-09-06openpgp: Fix typos spotted by codespell.Wiktor Kwapisiewicz
2022-08-16openpgp: Expose `HashAlgorithm::oid()` on all crypto backends.Wiktor Kwapisiewicz
- Expose `oid()` function for all cryptographic backends. - Fix the description to accurately describe the bytes that are being returned. - Add the reference and note to the common use of this function. - Add practical example of computing the entire `DigestInfo` structure. - Add mention of the change to the NEWS file. - Add test case to check if the values match what Nettle is using. - Fixes #919.
2022-08-15ipc: Harmonize indent macro.Nora Widdecke
- We have copies of this macro in buffered_reader and openpgp with the same semantics. - Use the code from buffered_reader and openpgp, to reduce confusion.
2022-08-15ipc, net: Fix assert_send_and_sync's doctests.Nora Widdecke
- Previously, the doctests for the macros were not run, and hence not tested. Fix the few issues that came up when Rust 1.62 started running doctests. - We cannot test the macros in doctests, because the macros are not public. Add equivalent unit tests instead. - Changes copied from 9d4be0b243b6a0d61c7fa1b33d6b1f978f1b6601. - Fixes #916.
2022-08-15ci: Test the whole workspace in windows-gnu-nettle.Nora Widdecke
- Since 8919c8100f72f6313071bb221550c606a38f3747, only buffered-reader and openpgp were tested on windows-gnu with nettle. This leaves out the other crates, especially net and ipc. - Test the whole workspace in windows-gnu-nettle, so that all crates are tested on Windows.
2022-08-15ci: Update gnupg in windows-gnu-nettleNora Widdecke
- MSYS2 has gnupg 2.2.36, but the version installed when building the docker image is still 2.2.35. - Fixes #873
2022-08-15ci: Emit meta information for easier debugging.Nora Widdecke
2022-08-15openpgp: Avoid hardcoding EAX for memory encryption.Justus Winter
- Previously, we used EAX for memory encryption because it was supported by all cryptographic backends. However, this is problematic for OpenSSL, which doesn't support EAX. - Instead, have the backends provide a default algorithm to use that they support.
2022-08-11sq: Move common types into module.Nora Widdecke
2022-08-11sq: Unify ArmorKind.Nora Widdecke
- ArmorKind and PacketKind represent the same values to the cli and are basically identical. - Unify them to ArmorKind.
2022-08-11sq: Remove prefix Cli from names.Nora Widdecke
2022-08-11sq: DRY entity names in module paths.Nora Widdecke
2022-08-09sq: Extract each first level subcommand into module.Nora Widdecke
- sq_cli.rs has become unwieldy. - Refactor, so that each first level subcommand has its own module.
2022-07-29sq: update dependencies on Subplot creates to new releaseLars Wirzenius
This will let `sq` not depend on `clap` version 2, even transitively. Sponsored-by: pep.foundation
2022-07-28openpgp: Fix subtraction with overflow.Justus Winter
- When the decryptor returns a short session key without reporting an error, an overflow occurs. Avoid this by using saturating subtraction. Then, the resulting range is empty, and an error will be reported just a few lines down. - Fixes #913.
2022-07-21sq: relax serde_json dependency to 1.0.80Daniel Kahn Gillmor
This is the most conservative possible relaxation of the dependency, and it makes the tool buildable on debian stable, where serde_json is currently blocked by a confusing mess (https://bugs.debian.org/1015743) I suspect it could be relaxed even further (best would be serde_json = "1"), but i haven't tested it against serde 1.0.0, and this change is sufficient for my purposes for now.
2022-07-20sq: add command output-versionsLars Wirzenius
This allows the user to query what output versions are available and what is the current default one. Sponsored-by: NLnet Foundation; NGI Assure
2022-07-20sq: move all output models to src/output.rsLars Wirzenius
This makes it easier to manage them in one place. Also, allows one place where the output model version is picked. Also add integration tests to sq-subplot.md. Sponsored-by: NLnet Foundation; NGI Assure
2022-07-20sq: add JSON support for sq wkd url/direct-urlLars Wirzenius
The JSON is the same same for both subcommands on the assumption that if someone is consuming JSON, they will pick the field relevant to them in any case. For someone consuming the default output format, they choose by using the right subcommand and don't have to parse the output. Sponsored-by: NLnet Foundation; NGI Assure
2022-07-20sq: Improve help formatting.Nora Widdecke
2022-07-20sq: Fix help generation for docs.Nora Widdecke
- Use clap-provided mechanisms instead of manually parsing --help output. - Fixes #872.
2022-07-20sq: Assign ordering of wkd subcommands.Nora Widdecke
2022-07-20sq: Derive subcommand display order from fields.Nora Widdecke
- This is more intuitive instead of fiddling with display_order numbers. - Allows iterating over the subcommands in the order they are displayed.
2022-07-20sq: Clean up build.Nora Widdecke
- Remove the workaround that was required to include help output in docs.