summaryrefslogtreecommitdiffstats
path: root/ipc
AgeCommit message (Collapse)Author
2024-03-10ipc: Release 0.34.1.ipc/v0.34.1Neal H. Walfield
2024-03-10ipc: Add missing import in Windows code.Neal H. Walfield
2024-03-09ipc: Release 0.34.0.ipc/v0.34.0Neal H. Walfield
2024-03-09ipc: Improve error message.Neal H. Walfield
- If we can't open the socket, include the socket's file name as context.
2024-03-06ipc: Add callbacks to simplify tracing client-server interactions.Justus Winter
- To simplify debugging client-server interactions, add tracing callbacks to `Assuan`.
2024-03-06ipc: Update Client::send_simple with the version from the chameleon.Neal H. Walfield
- 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
2024-03-06ipc: Don't panic if the server disappears, return an error.Neal H. Walfield
- 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.
2024-02-20ipc: Release 0.33.0.ipc/v0.33.0Neal H. Walfield
2024-02-20ipc: Ensure server's socket is in non-blocking mode.Neal H. Walfield
- 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`.
2024-01-26ipc: Release 0.32.0.ipc/v0.32.0Neal H. Walfield
2024-01-26ipc: Upgrade capnp-rpc.Neal H. Walfield
2023-11-15ipc: Track the offset of records in a Keybox file.Justus Winter
- Fixes #980.
2023-11-14sequoia-ipc uses openpgp::crypto::ecdh::decrypt_unwrap2 that was introduced ↵Alexander Kjäll
in version 1.17.0 of sequoia-openpgp
2023-10-27ipc: Release 0.31.0ipc/v0.31.0Neal H. Walfield
2023-10-27ipc: Upgrade socket2Neal H. Walfield
2023-10-27ipc: Upgrade dirsNeal H. Walfield
2023-10-27ipc: Upgrade ctorNeal H. Walfield
2023-10-27ipc: Upgrade clapNeal H. Walfield
- Upgrade clap from clap 3 to clap 4. - Use the opportunity to change to clap's derive-style API.
2023-10-27ipc: Upgrade capnpNeal H. Walfield
2023-09-21openpgp: Fix Encryptor's lifetime parameter.Neal H. Walfield
- `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.
2023-09-15Bump MSRV to 1.67.Wiktor Kwapisiewicz
- Fixes https://gitlab.com/sequoia-pgp/sequoia/-/issues/1038
2023-08-24ipc: Use the new crypto::ecdh::decrypt_unwrap2.Justus Winter
2023-07-25ipc: Make starting the gpg-agent more robust.Justus Winter
- 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.
2023-07-25ipc: Implement loopback password entry.Justus Winter
2023-07-06ipc: Acknowledge unexpected inquiries.Justus Winter
- While signing and decrypting, handle unexpected inquiries. The agent will send PINENTRY_LAUNCHED inquiries if it has to unlock a key.
2023-07-06ipc: Add additional constructors.Justus Winter
2023-05-16ipc: Upgrade lalrpop.Neal H. Walfield
- Upgrade lalrpop to version 0.20.
2023-05-03Tighten dependenciesNeal H. Walfield
- 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
2023-02-02ipc: Release 0.30.1.ipc/v0.30.1Neal H. Walfield
2023-02-01ipc: Fix the keybox parserNeal H. Walfield
- 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.
2023-02-01ipc: Release 0.30.0.ipc/v0.30.0Neal H. Walfield
2023-01-23ipc: Only build the Unix Domain Socket emulation code on Windows.Justus Winter
- This fixes a test failure on big endian systems. No big endian Windows systems are known to exist.
2023-01-07ipc: Make gnupg::KeyPair usable in async contexts.Justus Winter
- 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.
2023-01-05Don't select a cryptograhic backend in non-leaf crates.Justus Winter
- 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.
2022-12-23Port to Rust Edition 2021.Justus Winter
2022-12-23ipc: Bump clap to 3.Justus Winter
2022-12-07ipc: Rework Agent::sign using async fn.Justus Winter
- 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.
2022-12-07ipc: Rework Agent::decrypt using async fn.Justus Winter
- 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.
2022-12-07ipc: Add a convenience function to send simple commands.Justus Winter
2022-12-07ipc: Add a stern warning to assuan::Client::send.Justus Winter
2022-11-07ipc: Release 0.29.0.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-09-29ipc: Fix computing keygrips.Justus Winter
2022-09-29ipc: Drop unused attribute.Justus Winter
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-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-07-05ipc: Securely delete Sexp strings.Justus Winter
2022-07-05ipc: Implement convenience conversions.Justus Winter
2022-06-20ipc: Improve error handling when importing keys.Justus Winter