Ohttp msrv bump 1.85.0 - #9
Draft
benalleng wants to merge 5 commits into
Draft
Conversation
Run the rust-hpke backend on stable Rust and nothing else, so a red board means a real regression. The nss legs could never pass: NSS has no secp256k1 DHKEM, and the backend has not compiled since the Kem enum was pruned to K256Sha256 in bac8f2c. Whether to delete the backend is a separate decision; until then it stays out of the matrix. The 1.63.0 legs die during dependency resolution, before any code in this repository is compiled, because that cargo cannot parse modern dependency manifests; the MSRV leg returns once payjoin#6 settles what the MSRV is. The NSS build prerequisites and clone steps go with the legs that used them, as does the llvm-tools-preview component nothing here consumes.
`PrivateKey`'s Debug impl still bound `b` from `key_data()` after the body was changed to print "[REDACTED]", leaving it unused. With `#![deny(warnings)]` that is a hard error on current rustc, so the crate does not build on the CI matrix's `stable` leg. `PublicKey`'s Debug still uses `b` and is unchanged.
The AES-GCM symmetric suites were advertised but could never be used. bitcoin-hpke removed its AES-GCM schemes in 0.13.0, and `dispatch_hpkes_new!` only ever mapped ChaCha20Poly1305, so a peer that honoured the advertisement and selected AES-GCM got `Err(InvalidKeyType)`. `Config::supported()` returned true for it anyway, and the test constants listed it first, which is why 11 of this crate's own tests failed. Correcting `supported()` makes `strip_unsupported` prune the advertised KeyConfig automatically. The `Aead` enum keeps its GCM variants so other peers' configs still parse. `decode` built its probe config with `Aes128Gcm` on the grounds that "the KDF and AEAD doesn't matter here"; it does now, since the probe is checked against `supported()`, so it uses ChaCha20Poly1305. `decode` also rejects a config whose suite list is empty after pruning, with `Error::Unsupported`. Without that, a client handed a GCM-only config reached `ClientRequest::from_config`, which selects `symmetric[0]`, and panicked on the empty list where `main` returned `InvalidKeyType`. `decode_list` already skips `Unsupported` entries, so a list containing such a config decodes to the usable remainder. A test covers both paths. The example server no longer requests AES-128-GCM, which it would only have had stripped. Two tests were stale from before the secp256k1 port and never passed: `derive_key_pair`'s expected config encoded a 32-byte X25519 key under KEM 0x0020, regenerated here for KEM 0x0016 with a 65-byte key; and `truncate_kdf_aead_list` hard-coded an offset that assumed the X25519 key size, so it now derives the offset from the encoding. Also fixes two lints current clippy rejects under this crate's `deny(warnings, clippy::pedantic)`: a redundant `continue` and non-inlined format args.
By updating the editions to 2024 it allows us to utilize the more up-to-date cargo resolver features to keep msrv in check within the toml configuration itself. This change does mandate that we update the msrv to at least 1.84.0 but with rust-payjoin and the main payjoin crate already being at 1.85.0 it seems appropriate to do the same here.
benalleng
force-pushed
the
ohttp-msrv-bump-1.85.0
branch
from
September 10, 2026 15:47
7902c81 to
84a89d6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the msrv to 1.85.0 and also uses more up-to-date cargo toml features to better handle msrv pinning within the repo.
Closes #6
Blocked by #8