Skip to content

Speed up deserialization#29

Merged
bal-e merged 16 commits intomainfrom
faster-signing
Jan 21, 2026
Merged

Speed up deserialization#29
bal-e merged 16 commits intomainfrom
faster-signing

Conversation

@bal-e
Copy link
Contributor

@bal-e bal-e commented Jan 15, 2026

Use kmip_protocol::ttlv::FastScanner for scanning request messages.

  • Test that all previously supported requests can still be parsed.

@bal-e bal-e requested a review from ximon18 January 15, 2026 15:51
@bal-e bal-e self-assigned this Jan 15, 2026
@bal-e bal-e added the enhancement New feature or request label Jan 15, 2026
@bal-e
Copy link
Contributor Author

bal-e commented Jan 19, 2026

This has been tested by #30 and #31.

@bal-e bal-e marked this pull request as ready for review January 19, 2026 15:17
bal-e added 15 commits January 21, 2026 15:52
'Daemon' can be used to reliably launch 'kmip2pkcs11' using SoftHSMv2
from a regular integration test. With this little bit of setup effort,
it eliminates the need for containerized testing, and allows multiple
tests to execute in parallel with a single daemon.

An initial attempt used the regular test harness and put the daemon in
a 'LazyLock' static; but this would prevent dropping and cleaning up the
temporary directory. Instead, the test harness was omitted, and tests
will have to be parallelized manually.
'kmip2pkcs11's dependencies have been adjusted to avoid the 'sync' vs.
'async' feature flag problem, caused by 'kmip-protocol' and 'kmip-ttlv's
use of 'maybe-async'.

A minor frustration: 'kmip-protocol' needlessly enables 'ring' on
'rustls'. Due to the complex dependency tree, 'rustls' now has both
'ring' and 'aws_lc_rs' backends enabled, but *only during tests*.
This conflicts weirdly with Rust's incremental engine: it only retains
compilation state from the immediately prior compilation. 'cargo test'
will enable the 'ring' feature, then 'cargo build --bin' (inside the
test) will disable it. This causes 'ring', 'rustls', and all crates
depending on them to get repeatedly recompiled. While this is really a
Rust compiler problem, we want to prevent 'kmip-protocol' from adding
the 'ring' feature anyway.
Different crates depending on 'rustls' were using 'aws-lc-rs' and
'ring'. Ideally, the choice should be left to the top-level application
(i.e. here), but 'kmip-protocol' currently enables 'ring'. For
simplicity, the remaining crates have been stopped from enabling
'aws-lc-rs', so now 'ring' is the only enabled crypto provider.
At the moment, 'kmip2pkcs11' only supports RSA-SHA256 and
ECDSAP256SHA256, so those are the only ones we test.
We rely on it unconditionally in 'main.rs'.
@bal-e bal-e merged commit 9a47e1f into main Jan 21, 2026
9 checks passed
@bal-e bal-e deleted the faster-signing branch January 21, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants