Skip to content

Full-pipeline test for signing#30

Merged
bal-e merged 14 commits intofaster-signingfrom
signing-test
Jan 21, 2026
Merged

Full-pipeline test for signing#30
bal-e merged 14 commits intofaster-signingfrom
signing-test

Conversation

@bal-e
Copy link
Contributor

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

This PR adds a full system test for kmip2pkcs11, by spawning the daemon (configured with SoftHSMv2) and querying it via domain-kmip. It's relatively simple (no containerization, should be usable from CI) and well-isolated (careful use of temporary directories). Hopefully, it can serve as a nice way to systematically test kmip2pkcs11 as a whole.

It merges onto #29, where I wanted it to check that KMIP request parsing still works properly. It has already helped me catch one bug (missing buffer.drain(), which I amended into #29).

@bal-e bal-e requested a review from ximon18 January 19, 2026 12:33
@bal-e bal-e self-assigned this Jan 19, 2026
@bal-e bal-e mentioned this pull request Jan 19, 2026
1 task
bal-e added 5 commits January 19, 2026 16:23
'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.
@bal-e bal-e merged commit d843012 into faster-signing Jan 21, 2026
9 checks passed
@bal-e bal-e deleted the signing-test branch January 21, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants