Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
- If we can't open the socket, include the socket's file name as
context.
|
|
- To simplify debugging client-server interactions, add tracing
callbacks to `Assuan`.
|
|
- The Chameleon copied and improved `Client::send_simple`. Update
the copy here. See:
https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/blob/70802790d7d95c0084a8fea71a0836b3efc39910/src/agent.rs#L182
|
|
- If the server exits, we set the connection's state to
`WriteState::Dead`.
- When sending a message, don't panic if the connection's state is
`WriteState::Dead`. Instead, return an error message.
|
|
|
|
- According to the documentation for [`TcpListener::from_std`] the
passed socket must be in non-blocking mode:
> The caller is responsible for ensuring that the listener is in
> non-blocking mode. Otherwise all I/O operations on the listener
> will block the thread, which will cause unexpected
> behavior. Non-blocking mode can be set using set_nonblocking.
[`TcpListener::from_std`]: https://docs.rs/tokio/1.36.0/tokio/net/struct.TcpListener.html
- Make sure that is the case for any socket we pass to
`TcpListener::from_std`.
|
|
|
|
|
|
- Fixes #980.
|
|
in version 1.17.0 of sequoia-openpgp
|
|
|
|
|
|
|
|
|
|
- Upgrade clap from clap 3 to clap 4.
- Use the opportunity to change to clap's derive-style API.
|
|
|
|
- `Encryptor` uses a single lifetime for two fields, which is too
restrictive in some situations.
- To avoid breaking the API, introduce `Encryptor2`, which is just
`Encryptor` renamed, and with an added lifetime parameter, and make
`Encryptor` a thin wrapper around `Encryptor2`.
- Deprecate `Encryptor`.
- See #1028.
|
|
- Fixes https://gitlab.com/sequoia-pgp/sequoia/-/issues/1038
|
|
|
|
- Try to create the socket directory, but don't fail if that should
fail. In environments where /run/user/$UID doesn't exist, this
will fail, and GnuPG will transparently fall back to putting the
sockets into $GNUPGHOME.
|
|
|
|
- While signing and decrypting, handle unexpected inquiries. The
agent will send PINENTRY_LAUNCHED inquiries if it has to unlock a
key.
|
|
|
|
- Upgrade lalrpop to version 0.20.
|
|
- Fix the memsec and lalrpop dependencies. When allowing multiple,
incompatible versions of a package using `">x.y"` always specify a
upper bound to prevent a dependee that runs `cargo update` from
using a yet-to-be-released incompatible version in the future.
- Fix the openssl dependencies. When specifying a micro version, we
don't need to use ">" to get new semver-compatible versions. That
is, the default strategy is not "=", but "^".
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
|
|
|
|
- The current implementation of the parser cuts off the last eight
bytes of the certificate data, based on the assumption that they are
a magic fingerprint.
- Additional research indicates that they are actually a valid
gpg-specific trust packet, and the trust packet is not always
present.
- Since Sequoia has no problem parsing and ignoring trust packets
from gpg, and the trust packets are not always there, simply
return the certificate data as is.
- Fixes #981.
|
|
|
|
- This fixes a test failure on big endian systems. No big endian
Windows systems are known to exist.
|
|
- See if we are executing under a tokio async runtime, and if so,
start a new one on a different thread.
- This works around a design problem with the
openpgp::crypto::{Signer, Decryptor} traits that use sync functions,
but our implementation of the traits is async. We used to
unconditionally start a tokio runtime and block to hide the async
nature of the implementation, but that leads to panics if the
current thread is already managed by a tokio runtime. This is a
really easy mistake to make, and is not detected by the type
system.
|
|
- This way, only the leaf package has to concern itself with the
selection of a cryptographic backend for Sequoia. Notably, we
don't have to repeat all of sequoia-openpgp's features in all
crates that use sequoia-openpgp.
- Enable the new feature resolver which allows for this method.
- A complication arises because we want to make `cargo test` work by
default for the intermediate crates without developers having to
select a cryptographic backend. To make that work, we implicitly
select a backend in the dev dependencies which are enabled when
compiling the tests. To make it even more convenient, we select
the most convenient backend, which is CNG for Windows and Nettle,
our default, for every other platform.
- Now that we have implicitly selected CNG on Windows for running
the tests, when the user wants to use Nettle on Windows, and does
`cargo test --features sequoia-openpgp/crypto-nettle`, then two
backends are selected: the implicitly selected CNG and the
explicitly selected Nettle. In this case, we detect that an
implicit selection has been made, and ignore the implicitly
selected backend. Now, this has already been compiled by
cargo (remember that we cannot influence the set of dependencies
at the time the build script is run), but we can still ignore the
implicit backend using conditional compilation (i.e. it will not
be included in the resulting binary). The same happens on
non-Windows platforms where Nettle is the implicit default for
tests when the user explicitly requests a different backend. In
both cases, Nettle and CNG are slim wrappers around native
libraries, so the wasted compilation time is low.
|
|
|
|
|
|
- Previously, the code used an explicit state machine because it
predated the async fn support in rustc.
- This also fixes a bug where server and client lose sync if
the server returns an error.
|
|
- Previously, the code used an explicit state machine because it
predated the async fn support in rustc.
- This also fixes a bug where server and client lose sync if
PKDECRYPT returns an error.
|
|
|
|
|
|
|
|
- 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.
|
|
|
|
|
|
- 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).
|
|
- 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.
|
|
- 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.
|
|
|
|
|
|
|