You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: detect PQC keys via PKCS#8 OID + parity test gaps (#97)
pki-client-output's SanEntry is a serde-tagged enum, so `pki cert show -f
json` emits `{"Dns":"x"}` in the SAN array. The openssl parity script was
asserting on the flat "DNS:x" form produced by the Display impl, so every
SAN assertion diverged. Normalize via jq (`to_entries | key+:+value`,
uppercasing Dns/Ip to DNS/IP).
Subject DN assertions broke under openssl 3.5+ which drops spaces around
`=`. Normalize both sides with `sed 's/ = /=/g'` before matching.
EKU assertions used openssl's short names (serverAuth/clientAuth); pki
emits RFC 5280 long-form labels ("TLS Web Server Authentication"). Assert
on the long form — that's the canonical text, not the openssl shorthand.
Issue #97: ML-DSA/SLH-DSA private keys were misreported as "EC P-256,
256 bits, Strong" because spork-core emitted raw seeds and the detector
fell through to size-based heuristics. Fix at the source:
* vendor/spork-core/src/algo/pqc_pkcs8.rs — RFC 5958 wrap/unwrap helpers.
* mldsa_impl + slhdsa_impl now export PKCS#8 PrivateKeyInfo with the
correct AlgorithmIdentifier OID; `from_pkcs8_der` transparently
extracts the raw seed (and still accepts legacy raw-seed blobs for
backward compat with keys on disk).
* crates/pki-client/src/compat.rs — PKCS#8 OID detection runs first,
routing PQC OIDs to `KeyAlgorithm::MlDsa` / `SlhDsa`. Also wires
build_with_key through spork-core's PQC AlgorithmIds so `pki csr
create` no longer errors on PQC keys.
Plumbing:
* Box the ML-DSA-65/87 round-trip test keys — debug builds overflowed
the test stack holding three ExpandedSigningKeys simultaneously.
* crates/pki-client/tests/key_show_algorithms.rs — regression guard:
generate each algorithm, assert detector output, specifically catch
any PQC→EcP256 misidentification.
* .github/workflows/interop.yml — openssl-parity job + broader PR
path triggers so parity regressions block merges.
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments