Repository navigation
Conversation
|
P.S. let me know if you'd prefer to wait for |
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #338 +/- ##
==========================================
+ Coverage 75.89% 76.34% +0.44%
==========================================
Files 28 28
Lines 3423 3475 +52
Branches 3423 3475 +52
==========================================
+ Hits 2598 2653 +55
+ Misses 608 605 -3
Partials 217 217
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I would wait for |
|
the bump is done here: #345 |
|
@Frosne CI is failing pretty hard |
I blame the minimal nss required version (the plaintext field appeared only in 134), but let me check |
| } | ||
|
|
||
| #[must_use] | ||
| pub const fn new_with_early_data( |
There was a problem hiding this comment.
Maybe a new constrctor?
| }; | ||
|
|
||
| mod handshake; | ||
| #[path = "agent/resumption_process.rs"] |
There was a problem hiding this comment.
Why do you need path here?
There was a problem hiding this comment.
I wanted to keep the process helper (resumption_process.rs) separate. But without #[path], mod resumption_process; looks for the file in tests/, not in tests/agent/.
There was a problem hiding this comment.
Does use agent::resumption_process::... work? This path thing doesn't appear very idiomatic,
|
|
||
| /// A token with the same kind, expiration time and early data limit, with `token` as its bytes. | ||
| #[must_use] | ||
| pub const fn clone_with_bytes(&self, token: Vec<u8>) -> Self { |
There was a problem hiding this comment.
I think this patch mozilla/neqo#4405 will be cleaner with the clone_with_bytes function
There was a problem hiding this comment.
🟡 Changes recommended
Plaintext tokens can be mislabeled as encrypted and exposed through Debug, and the missing zeroize alloc feature can prevent the new derives from compiling.
3 open issues
What changed in this PR
Adds opt-in plaintext resumption-token export to the NSS client API, supporting reuse across processes while making token confidentiality explicit.
Changes:
- Exposes plaintext export controls and token-kind metadata.
- Adds plaintext debug redaction and zeroization of token storage.
- Adds cross-process tests for plaintext resumption and wrapped-token rejection.
| File | Description |
|---|---|
tests/agent/resumption_process.rs |
Adds a subprocess helper for cross-process resumption tests. |
tests/agent.rs |
Adds configurable client setup and plaintext versus wrapped-token tests. |
src/ssl.rs |
Binds NSS’s experimental plaintext export API. |
src/lib.rs |
Re-exports TokenKind. |
src/agent.rs |
Adds export controls, token classification, redaction, and zeroization. |
Cargo.toml |
Makes zeroize mandatory rather than tied to blapi. |
Review effort: Balanced
| #[must_use] | ||
| pub const fn new(token: Vec<u8>, expiration_time: Instant) -> Self { | ||
| Self::new_with_early_data(token, expiration_time, 0) | ||
| Self::new_with_early_data(TokenKind::Encrypted(token), expiration_time, 0) |
| .spawn() | ||
| .expect("should start child"), | ||
| ); | ||
| let (mut stream, _) = listener.accept().expect("child should connect"); |
Updated zeroize dependency to include 'alloc' feature. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>


This patch is adding
Client::enable_plaintext_resumption_export, which binds NSS'sSSL_EnablePlaintextResumptionExport, andis_plaintextfunction, which is trying to check if the token is encrypted or not. Thisis_plaintext()would be replaced bySSLResumptionTokenInfo.plaintextSecretas soon as the patch is accepted